diff options
author | Mihai Bazon <mihai@bazon.net> | 2014-01-07 12:48:21 +0200 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2014-01-07 12:48:21 +0200 |
commit | 27142df4f55a070f5507b74518ca807e014111ca (patch) | |
tree | 00c8306c91bd0150a21b457205aae46eae7dd79c | |
parent | 5e4c7f42454f12761a95241a03e6b36a46df2283 (diff) | |
download | tracifyjs-27142df4f55a070f5507b74518ca807e014111ca.tar.gz tracifyjs-27142df4f55a070f5507b74518ca807e014111ca.zip |
minor: exp["10"] => exp[10]
-rw-r--r-- | lib/compress.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js index 9a6dd5e5..448657c2 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -2287,6 +2287,12 @@ merge(Compressor.prototype, { property : prop }); } + var v = parseFloat(prop); + if (!isNaN(v) && v.toString() == prop) { + self.property = make_node(AST_Number, self.property, { + value: parseFloat(prop) + }); + } } return self; }); |