Error When Freezing Array.prototype

Open
#244 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
nodejs, typescript
Domain
api, backend

Research direction

Start by locating the code that adds the at method to Array.prototype, then reproduce the error by running the application described in the issue. Confirm the change avoids errors when Array.prototype is frozen and that the application runs successfully.

Written by the indexing model from the issue text.

Description

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

Dominant language
TypeScript
Stars
36
Forks
50
Avg merge
13h 46m
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/databricks-sql-nodejs

All issues in databricks/databricks-sql-nodejs

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.