Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
bcef697282
fix issue with parser and lower case true/false 2020-09-01 01:11:20 +01:00
2 changed files with 4 additions and 4 deletions

View file

@ -18,9 +18,9 @@ ws "whitespace" = [ \t\n\r]*
value = false / null / true / object / array / number / stringval / class / empty
empty = "" { return undefined; }
null = "None" { return null; }
false = "False" { return false; }
true = "True" { return true; }
null = "None" / "none" { return null; }
false = "False" / "false" { return false; }
true = "True" / "true" { return true; }
// ----- Objects -----

View file

@ -87,7 +87,7 @@ function deparseArray(input) {
function deparseNumber(input, key) {
// Any number which has a decimal is stored to 6 decimal places
// Except for IDs. Unless they actually have such a number... erm...
if (key.substr(key.length - 2, 2) === "ID") {
if (key && key.substr(key.length - 2, 2) === "ID") {
if (input % 1 === 0) {
return Number(input).toString();
}