Skip to content

Commit

Permalink
fix: assignment to readonly property to allow running in strict mode (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
G-Rath authored and broofa committed Jun 22, 2018
1 parent 0705cd5 commit beffff8
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit beffff8

Please sign in to comment.