mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 07:30:41 +09:00
Fix global leaks detected by mocha
Fix globals leaked in stringUtils, isJson and static/nav.html.
This commit is contained in:
1 parent
0a9ddef120
commit
0d4ad2f075
3 files changed
+3
-4
No files matched your search
@@ -2,7 +2,7 @@ module.exports = function(x){
|
||||
if(x === false || x === true || x === null) return true; // === false is valid JSON, so is true and null
|
||||
var isNotJson = false
|
||||
try{
|
||||
z = JSON.parse(x);
|
||||
JSON.parse(x);
|
||||
} catch (e) {
|
||||
isNotJson = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user