!31018 优化nodeContianer中nodeController的使用

Merge pull request !31018 from wangchensu/tdd
This commit is contained in:
openharmony_ci 2024-04-19 03:05:13 +00:00 committed by Gitee
commit 4e0652bea1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -83,7 +83,8 @@ void JSNodeContainer::Create(const JSCallbackInfo& info)
// check if it's the same object, and if it is, return it;
auto internalField = firstArg->GetProperty(NODE_CONTAINER_ID);
if (internalField->IsObject()) {
auto insideId = firstArg->GetProperty(INTERNAL_FIELD_VALUE);
auto obj = JSRef<JSObject>::Cast(internalField);
auto insideId = obj->GetProperty(INTERNAL_FIELD_VALUE);
if (insideId->IsNumber()) {
auto id = insideId->ToNumber<int32_t>();
if (id == nodeContainerId) {