Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
vm: use missing validator
The `vm` lib module's `isContext()` function should use a validator.
  • Loading branch information
VoltrexKeyva authored Jun 4, 2021
commit 3550e922b439fb6e5a1da879d97f30e8295eb136
5 changes: 2 additions & 3 deletions lib/vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,8 @@ function getContextOptions(options) {
}

function isContext(object) {
if (typeof object !== 'object' || object === null) {
throw new ERR_INVALID_ARG_TYPE('object', 'Object', object);
}
validateObject(object, 'object');

return _isContext(object);
}

Expand Down