Skip to content

Technical concern over modification of Boolean.prototype #2258

Open
@kronaemmanuel

Description

@kronaemmanuel

Description

This is more of a technical concern rather than a bug report. I'm a developer at Bryntum. Due to a recent customer report, I noticed that when using Bryntum Gantt along with infragistics.core.js file, we get a bug in out code. The bug happens because infragistics.core.js is modifying Boolean.prototype which is causing unintended side effects. In particular the getType() function on Boolean.prototype. Our code was mistakenly trying to process this method. I have changed code on our side, made it more robust so we dont accidentally process unexpected methods, to fix the bug. But I wanted to raise this concern with you. Modifying native prototypes, such as Boolean.prototype isn't a good practice because it affects all booleans throughout the application. This can lead to conflicts, especially in larger codebases where multiple libraries are used together.

Please consider using safer alternatives which do not involve altering native prototypes. Looking forward to your thoughts on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions