From 6729e9c97736b8a394bae020f7be6ea8fa8305a2 Mon Sep 17 00:00:00 2001 From: Dj <43033058+DjDeveloperr@users.noreply.github.com> Date: Wed, 21 Jun 2023 13:11:58 +0530 Subject: [PATCH] =?UTF-8?q?fix(cli/napi):=20`napi=5Fget=5Fbuffer=5Finfo`?= =?UTF-8?q?=20accepts=20`ArrayBufferView`=20=E2=80=A6=20(#19551)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... not just `Uint8Array`. This PR aligns behavior with Node.js Node-API implementation. --- cli/napi/js_native_api.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/napi/js_native_api.rs b/cli/napi/js_native_api.rs index 900a50f403..04121f0dce 100644 --- a/cli/napi/js_native_api.rs +++ b/cli/napi/js_native_api.rs @@ -1739,7 +1739,7 @@ fn napi_get_buffer_info( check_env!(env); let env = unsafe { &mut *env }; let value = napi_value_unchecked(value); - let buf = v8::Local::::try_from(value).unwrap(); + let buf = v8::Local::::try_from(value).unwrap(); let buffer_name = v8::String::new(&mut env.scope(), "buffer").unwrap(); let abuf = v8::Local::::try_from( buf.get(&mut env.scope(), buffer_name.into()).unwrap(),