Skip to content

Commit

Permalink
fixup! wasi: use missing validator
Browse files Browse the repository at this point in the history
Use another missing validator.
  • Loading branch information
VoltrexKeyva authored Jun 18, 2021
1 parent 324b78e commit ff75348
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/wasi.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const {
validateFunction,
validateInt32,
validateObject,
validateUndefined,
} = require('internal/validators');
const { WASI: _WASI } = internalBinding('wasi');
const kExitCode = Symbol('kExitCode');
Expand Down Expand Up @@ -151,10 +152,8 @@ class WASI {
validateFunction(
_initialize, 'instance.exports._initialize');
}
if (_start !== undefined) {
throw new ERR_INVALID_ARG_TYPE(
'instance.exports._start', 'undefined', _initialize);
}
validateUndefined(
_start, 'instance.exports._start');

if (_initialize !== undefined) {
_initialize();
Expand Down

0 comments on commit ff75348

Please sign in to comment.