Skip to content

Commit a1e555a

Browse files
JakobJingleheimerGeoffreyBooth
authored andcommitted
simplify initializeHooks return { hooks } β†’ hooks
1 parent 57cd5da commit a1e555a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

β€Žlib/internal/modules/esm/utils.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ async function initializeHooks() {
145145
);
146146
}
147147

148-
return { __proto__: null, hooks };
148+
return hooks;
149149
}
150150

151151
module.exports = {

β€Žlib/internal/modules/esm/worker.jsβ€Ž

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ async function customizedModuleWorker(lock, syncCommPort, errorHandler) {
9292

9393

9494
try {
95-
const initResult = await initializeHooks();
96-
hooks = initResult.hooks;
95+
hooks = await initializeHooks();
9796
} catch (exception) {
9897
// If there was an error while parsing and executing a user loader, for example if because a
9998
// loader contained a syntax error, then we need to send the error to the main thread so it can

0 commit comments

Comments
Β (0)