Skip to content

Conversation

@BikashMcKinsey
Copy link

@BikashMcKinsey BikashMcKinsey commented Apr 12, 2024

In a particular file, the Array.prototype is being frozen which is causing compatibility issues. The issue arises when the at method is added to the Array.prototype after it has been frozen, resulting in an error.

Steps to reproduce:

  1. Run the application.
  2. Observe the error related to the at method.

Expected behavior:
The application should run without errors.

Actual behavior:
An error occurs when running the application due to the Array.prototype being frozen before the at method is added.

Proposed solution:
Modify the code to conditionally add the at method to the Array.prototype only if it doesn't already exist.

If a project does freezing of Array prototypes this breaks it, even tho the node version is greater than 16
@BikashMcKinsey BikashMcKinsey changed the title Fix: Allow Compatibility with Node Version Greater Than 16.6.0 fix: Allow Compatibility with Node Version Greater Than 16.6.0 Apr 12, 2024
@BikashMcKinsey BikashMcKinsey changed the title fix: Allow Compatibility with Node Version Greater Than 16.6.0 fix: Error When Freezing Array.prototype #244 Apr 12, 2024
@BikashMcKinsey BikashMcKinsey changed the title fix: Error When Freezing Array.prototype #244 fix(#244): Error When Freezing Array.prototype Apr 12, 2024
@BikashMcKinsey
Copy link
Author

BikashMcKinsey commented Apr 12, 2024

Fixes #244

@BikashMcKinsey
Copy link
Author

BikashMcKinsey commented Apr 12, 2024

closing this PR since a request is already raised #242

@BikashMcKinsey BikashMcKinsey deleted the patch-1 branch April 12, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant