diff --git a/frameworks/bridge/declarative_frontend/jsview/js_plugin.cpp b/frameworks/bridge/declarative_frontend/jsview/js_plugin.cpp index f970b0f3245f2e4cf15adb2339e3e813da140a2e..268418307929dcb116e0e2434ac807a16a9b384b 100644 --- a/frameworks/bridge/declarative_frontend/jsview/js_plugin.cpp +++ b/frameworks/bridge/declarative_frontend/jsview/js_plugin.cpp @@ -70,7 +70,7 @@ void JSPlugin::Create(const JSCallbackInfo& info) auto dataValue = obj->GetProperty("data"); PluginModel::GetInstance()->Create(pluginInfo); - if (dataValue->IsObject()) { + if (!dataValue->IsEmpty() && dataValue->IsString()) { PluginModel::GetInstance()->SetData(dataValue->ToString()); } }