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
Kareem prevent me from adding custom method to Object.prototype #7
Comments
Can you provide a more thorough code sample? |
Here in this script https://github.com/menemslama/drello/blob/master/sockets.js I will get this error in my terminal from "kareem" $ node app TypeError: this._pres[key].slice is not a function NOTE: |
Yeah I'm going to close this for now because this issue's pretty stale and OP was never really clear about the issue. |
I can provide more details if you'd like. Bit late, but I just yesteday stumbled upon the same problem. When you add any new methods to Object object kareem somewhere inside fails on clone operation because it iterates there (for (var x in...) over object properties disregarding whether it is his own property or not (checkable via hasOwnProperty). so at some point it tries to clone function and dies. |
Yes please, provide more details, preferably a script that lets me repro the issue. Prose descriptions always fail to properly convey code issues. |
The simplest(-ish :D) I can think of.
In my case it fails when used by mongoose: lib/ model.js in Model.compile() |
Fixed, thanks for the repro |
when I'm trying to add a custom method to Object.prototype I got this error:
TypeError: this._pres[key].slice is not a function
at Kareem.clone (MYPATH\kareem\index.js:303:36)
The text was updated successfully, but these errors were encountered: