Quote objects with numeric keys
This commit is contained in:
committed by
Mihai Bazon
parent
2b8e206fec
commit
37d7cb8565
@@ -1033,7 +1033,7 @@ function OutputStream(options) {
|
|||||||
DEFPRINT(AST_ObjectKeyVal, function(self, output){
|
DEFPRINT(AST_ObjectKeyVal, function(self, output){
|
||||||
var key = self.key;
|
var key = self.key;
|
||||||
if (output.option("quote_keys")) {
|
if (output.option("quote_keys")) {
|
||||||
output.print_string(key);
|
output.print_string(key + "");
|
||||||
} else if ((typeof key == "number"
|
} else if ((typeof key == "number"
|
||||||
|| !output.option("beautify")
|
|| !output.option("beautify")
|
||||||
&& +key + "" == key)
|
&& +key + "" == key)
|
||||||
|
|||||||
Reference in New Issue
Block a user