@@ -163,10 +163,10 @@ merge(Compressor.prototype, {
|
|||||||
return make_node(AST_Undefined, orig).optimize(compressor);
|
return make_node(AST_Undefined, orig).optimize(compressor);
|
||||||
default:
|
default:
|
||||||
if (val === null) {
|
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) {
|
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}", {
|
throw new Error(string_template("Can't handle constant of type: {type}", {
|
||||||
type: typeof val
|
type: typeof val
|
||||||
|
|||||||
Reference in New Issue
Block a user