Skip to content

Commit

Permalink
throw
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed Jul 1, 2023
1 parent 7458d53 commit 60bc9b3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/emnapi/src/value/convert2c.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ function napi_get_prototype (env: napi_env, value: napi_value, result: Pointer<n
$CHECK_ARG!(envObject, result)
const handle = emnapiCtx.handleStore.get(value)!
if (handle.value == null) {
envObject.tryCatch.setError(new TypeError('Cannot convert undefined or null to object'))
return envObject.setLastError(napi_status.napi_pending_exception)
throw new TypeError('Cannot convert undefined or null to object')
}
let v: any
try {
Expand Down

0 comments on commit 60bc9b3

Please sign in to comment.