diff options
author | Vladimir Zhuravlev <private.face@gmail.com> | 2013-03-31 20:55:11 +0700 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2013-03-31 19:52:28 +0300 |
commit | 37d7cb8565ec3edba6de464a42e7b163a4e30a58 (patch) | |
tree | 84c4e7c36eb17c9e68ea282590eaa71c67bbf32f /lib | |
parent | 2b8e206feca5d14242f5a659e724c5b0eefc4499 (diff) | |
download | tracifyjs-37d7cb8565ec3edba6de464a42e7b163a4e30a58.tar.gz tracifyjs-37d7cb8565ec3edba6de464a42e7b163a4e30a58.zip |
Quote objects with numeric keys
Diffstat (limited to 'lib')
-rw-r--r-- | lib/output.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/output.js b/lib/output.js index 04b20708..defd0215 100644 --- a/lib/output.js +++ b/lib/output.js @@ -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) |