-
-
Notifications
You must be signed in to change notification settings - Fork 903
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 assignment to readonly property to allow running in strict mode #270
fix assignment to readonly property to allow running in strict mode #270
Conversation
…rty, as you can't assign to readonly properties in strict mode.
@broofa for some reason the Since I don't know how that file works, I've not committed the changes. Let me know if I should. |
…ing to configure it. This should allow compatibility with both strict mode and non-standard, pre-ES2015 implementations, such as in node 0.12.x
@broofa it seems this solution won't work with node 0.12.x, as it's a non-standard, pre-ES2015 implementation. I've fixed this by adding a conditional check to make sure the Given that prior to this the assignment to Let me know what you think, and if there are any adjustments you'd like me to make :) |
I published https://www.npmjs.com/package/uuid-pull-270 on NPM based on @G-Rath branch in case someone need it as well 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks!
Hello @broofa, any news on when this will get published? Struggling to get node-uuid working without this patch. |
…270) * Replaced assignment to readonly Function.name with Object.defineProperty, as you can't assign to readonly properties in strict mode. * added check to make sure the name property is configurable before trying to configure it. This should allow compatibility with both strict mode and non-standard, pre-ES2015 implementations, such as in node 0.12.x * Removed extra blank newline.
…270) * Replaced assignment to readonly Function.name with Object.defineProperty, as you can't assign to readonly properties in strict mode. * added check to make sure the name property is configurable before trying to configure it. This should allow compatibility with both strict mode and non-standard, pre-ES2015 implementations, such as in node 0.12.x * Removed extra blank newline.
Replaced assignment to readonly Function.name with Object.defineProperty, as you can't assign to readonly properties in strict mode.
Fixes #268