Skip to content

Commit

Permalink
Improved type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
cjchirag7 committed Apr 4, 2020
1 parent f1f8d75 commit 84f3496
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ EventHandle.prototype = {
};
function getUserType() {
let tokenInfo = parseJwt(getCookie('token'));
if (tokenInfo && tokenInfo.userType) {
if (typeof tokenInfo==='object' && tokenInfo.userType) {
return tokenInfo.userType;
} else {
return 'Null';
Expand Down
4 changes: 2 additions & 2 deletions test/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//config.js
//
//global.origin = 'http://localhost:4010'
global.origin = 'http://127.0.0.1:8080'
global.origin = 'http://localhost:4010'
// global.origin = 'http://127.0.0.1:8080'
global.testFolder = '/test'


Expand Down

0 comments on commit 84f3496

Please sign in to comment.