Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit f7008d4

Browse files
authored
Merge pull request #1576 from hirad-rewok/error_null_loginid
hirad/fix--Added condition to fix null loginId error
2 parents f36a65b + 16493d1 commit f7008d4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/navigation/navigation.es6

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ const initLoginButton = (root) => {
122122

123123
/* update balance on change */
124124
liveapi.events.on('balance', data => {
125-
const loginId = local_storage.get('authorize').loginid;
126-
if (data.balance && data.balance.loginid === loginId) update_balance(data);
125+
if (local_storage.get("authorize")) {
126+
const loginId = local_storage.get('authorize').loginid;
127+
if (data.balance && data.balance.loginid === loginId) update_balance(data);
128+
}
127129
});
128130

129131
liveapi.events.on('logout', () => {

0 commit comments

Comments
 (0)