Skip to content

Commit 22684b2

Browse files
committed
Use preset to set doesNotExistError instead of postset. NFC
Sometimes we throw `MEMFS.doesNotExistError` before it is initialized. It doesn't really matter because the error gets caught and thrown away, but it seems better to fix.
1 parent 55934a5 commit 22684b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/library_memfs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
addToLibrary({
88
$MEMFS__deps: ['$FS', '$mmapAlloc'],
99
#if !ASSERTIONS
10-
$MEMFS__postset: `
10+
$MEMFS__preset: `
1111
// This error may happen quite a bit. To avoid overhead we reuse it (and
1212
// suffer a lack of stack info).
1313
MEMFS.doesNotExistError = new FS.ErrnoError({{{ cDefs.ENOENT }}});

0 commit comments

Comments
 (0)