Skip to content

Commit 932ad15

Browse files
authored
fix: node-api version 10 support (#1641)
1 parent 704ce1a commit 932ad15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

napi-inl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3244,7 +3244,7 @@ inline void Error::ThrowAsJavaScriptException() const {
32443244

32453245
status = napi_throw(_env, Value());
32463246

3247-
#ifdef NAPI_EXPERIMENTAL
3247+
#if (NAPI_VERSION >= 10)
32483248
napi_status expected_failure_mode = napi_cannot_run_js;
32493249
#else
32503250
napi_status expected_failure_mode = napi_pending_exception;

0 commit comments

Comments
 (0)