[Pkg-javascript-commits] [uglifyjs] 31/77: Fix make_node_from_constant for Regexp-s
Jonas Smedegaard
dr at jones.dk
Tue May 19 00:02:29 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag v2.4.18
in repository uglifyjs.
commit 61c233a08ed3768f19f05579888b327eee7286ec
Author: Mihai Bazon <mihai at bazon.net>
Date: Wed Jan 7 11:20:04 2015 +0200
Fix make_node_from_constant for Regexp-s
Close #588
---
lib/compress.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/compress.js b/lib/compress.js
index 83c3e6d..d503ed1 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -163,10 +163,10 @@ merge(Compressor.prototype, {
return make_node(AST_Undefined, orig).optimize(compressor);
default:
if (val === null) {
- return make_node(AST_Null, orig).optimize(compressor);
+ return make_node(AST_Null, orig, { value: null }).optimize(compressor);
}
if (val instanceof RegExp) {
- return make_node(AST_RegExp, orig).optimize(compressor);
+ return make_node(AST_RegExp, orig, { value: val }).optimize(compressor);
}
throw new Error(string_template("Can't handle constant of type: {type}", {
type: typeof val
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git
More information about the Pkg-javascript-commits
mailing list