| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,6 +46,7 @@ | |||
| 46 | 46 | const { | |
| 47 | 47 | ArrayPrototypeMap, | |
| 48 | 48 | ArrayPrototypePush, | |
| 49 | + ArrayPrototypeSlice, | ||
| 49 | 50 | Error, | |
| 50 | 51 | ObjectCreate, | |
| 51 | 52 | ObjectDefineProperty, | |
@@ -239,8 +240,10 @@ class NativeModule { | |||
| 239 | 240 | const { ModuleWrap } = internalBinding('module_wrap'); | |
| 240 | 241 | const url = `node:${this.id}`; | |
| 241 | 242 | const nativeModule = this; | |
| 243 | + const exportsKeys = ArrayPrototypeSlice(this.exportKeys); | ||
| 244 | + ArrayPrototypePush(exportsKeys, 'default'); | ||
| 242 | 245 | this.module = new ModuleWrap( | |
| 243 | - url, undefined, [...this.exportKeys, 'default'], | ||
| 246 | + url, undefined, exportsKeys, | ||
| 244 | 247 | function() { | |
| 245 | 248 | nativeModule.syncExports(); | |
| 246 | 249 | this.setExport('default', nativeModule.exports); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments