We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
null
1 parent e7093f7 commit d921030Copy full SHA for d921030
lib/internal/modules/esm/loader.js
@@ -145,18 +145,20 @@ class ESMLoader {
145
146
if (globalPreloader) ArrayPrototypePush(
147
this.#globalPreloaders,
148
- globalPreloader,
+ FunctionPrototypeBind(globalPreloader, null), // [1]
149
);
150
if (resolver) ArrayPrototypePush(
151
this.#resolvers,
152
- resolver,
+ FunctionPrototypeBind(resolver, null), // [1]
153
154
if (loader) ArrayPrototypePush(
155
this.#loaders,
156
- loader,
+ FunctionPrototypeBind(loader, null), // [1]
157
158
}
159
160
+ // [1] ensure hook function is not bound to ESMLoader instance
161
+
162
this.preload();
163
164
0 commit comments