fix: use ready nodes in more places

This commit is contained in:
Jonathan Kelley committed 2022-12-25 01:37:00 -05:00
1 parent 85f6ea0545
commit 9b0244ee5c
10 files changed
+20 -20

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ use dioxus_core::{ElementId, RenderReturn, Scope};
pub use input::*;
pub(crate) fn get_root_id<T>(cx: Scope<T>) -> Option<ElementId> {
if let RenderReturn::Sync(Some(sync)) = cx.root_node() {
if let RenderReturn::Ready(sync) = cx.root_node() {
sync.root_ids.get(0).and_then(|id| id.get())
} else {
None