diff --git a/frameworks/js/napi/src/napi_bluetooth_event.cpp b/frameworks/js/napi/src/napi_bluetooth_event.cpp index 964e4d6bfda4d9780b26bec70e60e8aa7a39b2f2..43662d1a3643dc5b0d530d9a7c1ac241a1edee0e 100644 --- a/frameworks/js/napi/src/napi_bluetooth_event.cpp +++ b/frameworks/js/napi/src/napi_bluetooth_event.cpp @@ -36,13 +36,6 @@ void NapiEvent::EventNotify(AsyncEventData *asyncEvent) asyncEvent = nullptr; return; } - - napi_value callback = nullptr; - napi_status status = napi_get_reference_value(asyncEvent->env_, asyncEvent->callback_, &callback); - if (status != napi_ok || callback == nullptr) { - HILOGI("reference_value is null."); - return; - } uint32_t refCount = INVALID_REF_COUNT; napi_reference_ref(asyncEvent->env_, asyncEvent->callback_, &refCount); HILOGI("increments the reference count, refCount: %{public}d", refCount);