Quote objects with numeric keys

This commit is contained in:
Vladimir Zhuravlev
2013-03-31 20:55:11 +07:00
committed by Mihai Bazon
parent 2b8e206fec
commit 37d7cb8565

View File

@@ -1033,7 +1033,7 @@ function OutputStream(options) {
DEFPRINT(AST_ObjectKeyVal, function(self, output){
var key = self.key;
if (output.option("quote_keys")) {
output.print_string(key);
output.print_string(key + "");
} else if ((typeof key == "number"
|| !output.option("beautify")
&& +key + "" == key)