diff --git a/frameworks/js/napi/src/access/napi_bluetooth_access.cpp b/frameworks/js/napi/src/access/napi_bluetooth_access.cpp index 0a7368ff77e23173f483f23f8268378818765669..1277384262af43d09d81a833e3d73bcfddc4254e 100644 --- a/frameworks/js/napi/src/access/napi_bluetooth_access.cpp +++ b/frameworks/js/napi/src/access/napi_bluetooth_access.cpp @@ -43,7 +43,7 @@ napi_value NapiAccess::DefineAccessJSFunction(napi_env env, napi_value exports) AccessPropertyValueInit(env, exports); napi_property_descriptor desc[] = { DECLARE_NAPI_FUNCTION("getState", GetState), - DECLARE_NAPI_FUNCTION("enableBluetooth", EnableBluetooth), + {"enableBluetooth", nullptr, EnableBluetooth, nullptr, nullptr, nullptr, napi_writable, nullptr}, DECLARE_NAPI_FUNCTION("disableBluetooth", DisableBluetooth), DECLARE_NAPI_FUNCTION("restrictBluetooth", RestrictBluetooth), #ifdef BLUETOOTH_API_SINCE_10