Skip to content

Commit 53d44b6

Browse files
authored
fixup! wasi: add missing validator
Refs: nodejs#39070 (comment)
1 parent ff75348 commit 53d44b6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/wasi.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,11 @@ class WASI {
148148

149149
const { _start, _initialize } = this[kInstance].exports;
150150

151+
validateUndefined(_start, 'start');
151152
if (_initialize !== undefined) {
152153
validateFunction(
153154
_initialize, 'instance.exports._initialize');
154-
}
155-
validateUndefined(
156-
_start, 'instance.exports._start');
157-
158-
if (_initialize !== undefined) {
159-
_initialize();
155+
_initialize();
160156
}
161157
}
162158
}

0 commit comments

Comments
 (0)