Skip to content

Functions are sometimes put inside if blocks, breaking current Firefox, Safari & IE 10 #1052

@mgol

Description

@mgol

This is related to #179. Current Firefox & Safari as well as IE 10 don't accept function declarations inside and UglifyJS 2.6.2 with compress options:

{
    "hoist_funs": false,
    loops: false,
    unused: false
}

sometimes applies such a treatment.

This caused syntax errors in mentioned browsers on current jQuery master (source from commit 3befe5911a) where we enabled strict mode. More specifically, this function in the built file is transformed to be contained in a negation of this if.

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