| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 68630c5 commit 0a47d06
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,6 +22,7 @@ | |||
| 22 | 22 | 'use strict'; | |
| 23 | 23 | ||
| 24 | 24 | const { Math, Object, Reflect } = primordials; | |
| 25 | + const apply = Reflect.apply; | ||
| 25 | 26 | ||
| 26 | 27 | var spliceOne; | |
| 27 | 28 | ||
@@ -206,12 +207,12 @@ EventEmitter.prototype.emit = function emit(type, ...args) { | |||
| 206 | 207 | return false; | |
| 207 | 208 | ||
| 208 | 209 | if (typeof handler === 'function') { | |
| 209 | - Reflect.apply(handler, this, args); | ||
| 210 | + apply(handler, this, args); | ||
| 210 | 211 | } else { | |
| 211 | 212 | const len = handler.length; | |
| 212 | 213 | const listeners = arrayClone(handler, len); | |
| 213 | 214 | for (var i = 0; i < len; ++i) | |
| 214 | - Reflect.apply(listeners[i], this, args); | ||
| 215 | + apply(listeners[i], this, args); | ||
| 215 | 216 | } | |
| 216 | 217 | ||
| 217 | 218 | return true; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments