From 425828c0aea70e2402eba0ad7c8d0b68f3b7e8ce Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Sun, 16 Feb 2025 18:30:45 +0000 Subject: [PATCH] fix: node-api version 10 support --- napi-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/napi-inl.h b/napi-inl.h index e7141c05e..8e354585c 100644 --- a/napi-inl.h +++ b/napi-inl.h @@ -3244,7 +3244,7 @@ inline void Error::ThrowAsJavaScriptException() const { status = napi_throw(_env, Value()); -#ifdef NAPI_EXPERIMENTAL +#if (NAPI_VERSION >= 10) napi_status expected_failure_mode = napi_cannot_run_js; #else napi_status expected_failure_mode = napi_pending_exception;