aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2014-01-07 12:48:21 +0200
committerMihai Bazon <mihai@bazon.net>2014-01-07 12:48:21 +0200
commit27142df4f55a070f5507b74518ca807e014111ca (patch)
tree00c8306c91bd0150a21b457205aae46eae7dd79c /lib/compress.js
parent5e4c7f42454f12761a95241a03e6b36a46df2283 (diff)
downloadtracifyjs-27142df4f55a070f5507b74518ca807e014111ca.tar.gz
tracifyjs-27142df4f55a070f5507b74518ca807e014111ca.zip
minor: exp["10"] => exp[10]
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js6
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;
});