Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
| bcef697282 |
2 changed files with 4 additions and 4 deletions
|
|
@ -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 -----
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue