Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix constructor being converted to undefined #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sharshuv-quotient
Copy link

@sharshuv-quotient sharshuv-quotient commented Aug 23, 2023

The issue was that regular property accessing in javascript can inherit from the prototype.

By default, each object in js has the "object" prototype which has a "constructor" property on it (Which is a function).

I fixed this by createing the character Map so that it doesn't inherit from the default object.

See https://chat.openai.com/share/acece149-6d4b-457c-9ae9-7fa8a3ec35fc

The issue was that regular property accessing in javascript can inherit from the prototype. By default, each object in js has the "object" prototype which has a "constructor" property on it (Which is a function). I fixed this by createing the character Map so that it doesn't inherit from the default object.
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.

None yet

2 participants