added line to prevent JSON errors to crash the whole thing
This commit is contained in:
parent
65720bf3b6
commit
943cbd3562
@ -268,8 +268,12 @@ function updateInboxView() {
|
||||
if ( localStorage.key(i).length < 10 || element === 'outbox' ) {
|
||||
continue;
|
||||
}
|
||||
// alert(element);
|
||||
elementj = JSON.parse(element);
|
||||
// alert(element);
|
||||
try {
|
||||
elementj = JSON.parse(element);
|
||||
} catch (e) {
|
||||
continue;
|
||||
}
|
||||
|
||||
localStorageArray[i] = { time:localStorage.key(i), user:elementj.name, message:elementj.message, node:elementj.node, hops:elementj.hops };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user