Skip to content

Commit

Permalink
feat(dom): fix the error logic of UpdateNodeSize() about RootNode
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhaihuang authored and churchill-zhang committed Jun 22, 2022
1 parent 572bf52 commit 37b781b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,8 @@ void UpdateNodeSize(JNIEnv *j_env, jobject j_object, jint j_instance_id, jint j
update_style.insert({"width", width});
update_style.insert({"height", height});

std::vector<std::function<void()>> ops = {[dom_manager, node, update_style]{
std::vector<std::function<void()>> ops = {[dom_manager, root_node, node, update_style]{
node->UpdateDomNodeStyleAndParseLayoutInfo(update_style);
auto root_node = std::make_shared<hippy::RootNode>();
dom_manager->EndBatch(root_node);
}};
dom_manager->PostTask(Scene(std::move(ops)));
Expand Down

0 comments on commit 37b781b

Please sign in to comment.