diff options
author | Marcos Casagrande <marcoscvp90@gmail.com> | 2022-10-30 18:13:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-30 13:13:46 -0400 |
commit | 207dd8d111303f02b92d632ca00c165a657bc9c2 (patch) | |
tree | 270cd208e28351fa6ce8265aa63e9b299a613ac6 /cli/napi/js_native_api.rs | |
parent | 59ac110edd1f376bed7fa6bbdbe2ee09c266bf74 (diff) |
fix(napi): fix is_detached_arraybuffer (#16478)
Diffstat (limited to 'cli/napi/js_native_api.rs')
-rw-r--r-- | cli/napi/js_native_api.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cli/napi/js_native_api.rs b/cli/napi/js_native_api.rs index 32f4b787e..07b583beb 100644 --- a/cli/napi/js_native_api.rs +++ b/cli/napi/js_native_api.rs @@ -1798,9 +1798,7 @@ fn napi_is_detached_arraybuffer( ) -> Result { let value = transmute::<napi_value, v8::Local<v8::Value>>(value); let _ab = v8::Local::<v8::ArrayBuffer>::try_from(value).unwrap(); - // TODO: what is API for checking if ArrayBuffer is detached? - // there's only is_detachable I could find. - *result = false; + *result = _ab.was_detached(); Ok(()) } |