Skip to content

JS bitwise else if minifies incorrectly #335

@JRaspass

Description

@JRaspass

Apologies if this works with the unreleased code, I've only tested the current latest published version.

This

function foo(bar) {
    if ((bar & 0xFFFFF800) == 0) {
        return 1;
    }
    else if ((bar & 0xFFFF0000) == 0) {
        return 2;
    }
    return 3;
}

Minifes to this, note the lack of return 3 at all

function foo(a){if((a&4294965248)==0)return 1;if((a&4294901760)==0)return 2;if((a&2492471136)==0)return 2}

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