Skip to content

Commit 862bfdf

Browse files
committed
fixup: snapshot fix
1 parent 7928ef7 commit 862bfdf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/async-rewriter3/lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ let importPromise;
1212
if (v8.startupSnapshot?.isBuildingSnapshot?.()) {
1313
v8.startupSnapshot.addDeserializeCallback(() => {
1414
importPromise = import('../pkg/index.js');
15+
importPromise.then(exports => syncImport = exports);
1516
});
1617
} else {
1718
importPromise = import('../pkg/index.js');
19+
importPromise.then(exports => syncImport = exports);
1820
}
1921
let syncImport;
20-
importPromise.then(exports => syncImport = exports);
21-
2222

2323
module.exports = class AsyncWriter {
2424
async process(code) {

0 commit comments

Comments
 (0)