Removed unnesecesary json parsing and adjusted the expression for better style

This commit is contained in:
psihius committed 2018-04-17 22:07:18 +03:00
1 parent bb06723918
commit 1731426f49
1 file changed
+1 -1
+1 -1
View File
@@ -108,7 +108,7 @@ class ResearchSync {
try {
let kv = data.split(":");
let name = kv[0];
let researched = JSON.parse(kv[1]) === 'true' ? 1 : 0;
let researched = ('true' !== kv[1] ? 0 : 1);
let level = parseInt(kv[2]);
this.research[name] = [researched, level];
} catch (e) {