diff --git a/napi-inl.h b/napi-inl.h index 7e9dd726a..bcdbe6788 100644 --- a/napi-inl.h +++ b/napi-inl.h @@ -2583,7 +2583,7 @@ template inline uint32_t Reference::Ref() { uint32_t result; napi_status status = napi_reference_ref(_env, _ref, &result); - NAPI_THROW_IF_FAILED(_env, status, 1); + NAPI_THROW_IF_FAILED(_env, status, 0); return result; } @@ -2591,7 +2591,7 @@ template inline uint32_t Reference::Unref() { uint32_t result; napi_status status = napi_reference_unref(_env, _ref, &result); - NAPI_THROW_IF_FAILED(_env, status, 1); + NAPI_THROW_IF_FAILED(_env, status, 0); return result; }