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

Don't use object.create. Fixes #130. #132

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

stevage
Copy link
Contributor

@stevage stevage commented Jun 1, 2023

There's another instance of Object.create() in tables.js that looks suspicious to me, but removing it breaks tests, so I left it.

@z3dev
Copy link

z3dev commented Jun 1, 2023

The objects.create() is used incorrectly.

Object.create(proto, propertiesObject)

Norice that there are TWO parameters! One is the prototype to copy, i.e. the shape of the object,methods, etc. The other is the values of the properties.

@stevage
Copy link
Contributor Author

stevage commented Jun 1, 2023

Well, it's not incorrect to not pass a second parameter. But there is just no reason to use Object.create() at all here, as prototypes aren't being used afaik.

@skymakerolof
Copy link
Owner

Thanks!

@skymakerolof skymakerolof merged commit 948dbbc into skymakerolof:develop Jun 8, 2023
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.

3 participants