Commit d062fdc
fix: assignment to readonly property to allow running in strict mode (#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.1 parent c47702c commit d062fdc
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
0 commit comments