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

object.hasOwnProperty and objects without prototype error #604

Closed
adrianwix opened this issue Mar 16, 2022 · 2 comments
Closed

object.hasOwnProperty and objects without prototype error #604

adrianwix opened this issue Mar 16, 2022 · 2 comments
Labels

Comments

@adrianwix
Copy link

Please fix the calls to object.hasOwnProperty it causes the following error when the object does not has a Prototype.
the subject utility does not work because of that nor ability.can()
image

"@casl/ability": "^5.4.3",

PS: I don't think there is the need for more information regarding this bug. changing object.hasOwnProperty for Object.prototype.hasOwnProperty.bind(object)('Property') everywhere will solve the problem

@adrianwix adrianwix added the bug label Mar 16, 2022
@stalniy
Copy link
Owner

stalniy commented May 12, 2022

PR with such utility function is very welcome

@stalniy stalniy changed the title [BUG: breaks production] object.hasOwnProperty object.hasOwnProperty and objects without prototype error Jul 23, 2022
@stalniy
Copy link
Owner

stalniy commented Jul 25, 2022

fixed in @casl/ability@6.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants