mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-18 09:00:30 -05:00
Merge pull request #314 from mewtaylor/issue/gh-251-ban-undefined
Fix GH-251: log error for session request if there
This commit is contained in:
commit
4ab7cfef6b
1 changed files with 8 additions and 4 deletions
|
@ -37,11 +37,15 @@ var translations = require('../locales/translations.json');
|
|||
host: '',
|
||||
uri: '/session/'
|
||||
}, function (err, body) {
|
||||
if (err) return;
|
||||
|
||||
if (typeof body !== 'undefined') {
|
||||
if (body.banned) {
|
||||
return window.location = body.redirectUrl;
|
||||
} else {
|
||||
window.updateSession(body);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue