Skip to content

instanceOf: infinite loop #2780

Open
Open
@olgierd23

Description

@olgierd23

In some (rare) cases function instanceOf may fall into an infinite loop, which - in my case - was possible to eliminate by adding additional conditional break.

while (constructor){
	if (constructor === object) return true;
	if (constructor === constructor.parent) break;       // this line should be added
	constructor = constructor.parent;
}

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions