Skip to content

Compression fails for function expression in or expression #255

@arrix

Description

@arrix

The line var f = function() {} || false causes compression failure.
Happens with both npm uglify-js@2.3.6 and the master tip b7adbca

$ echo 'var f = function() {} || false' | ./bin/uglifyjs -c -

.../UglifyJS2/lib/compress.js:602
                if (ex !== def) throw ex;
                                      ^
Error: Can't handle constant of type: object
    at make_node_from_constant

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions