Add ScopeId::ROOT (#1398)
* add ScopeId::ROOT * replace ScopeId(0) with ScopeId::ROOT --------- Co-authored-by: Jani Mustonen <jani.mustonen@taitounited.fi>
This commit is contained in:
1 parent
de87ba6548
commit
31f8bab20d
22 files changed
+106
-91
No files matched your search
@@ -35,7 +35,7 @@ impl ElementRef {
|
||||
Self {
|
||||
template: None,
|
||||
path: ElementPath::Root(0),
|
||||
scope: ScopeId(0),
|
||||
scope: ScopeId::ROOT,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@ impl VirtualDom {
|
||||
fn next_reference(&mut self, template: &VNode, path: ElementPath) -> ElementId {
|
||||
let entry = self.elements.vacant_entry();
|
||||
let id = entry.key();
|
||||
let scope = self.runtime.current_scope_id().unwrap_or(ScopeId(0));
|
||||
let scope = self.runtime.current_scope_id().unwrap_or(ScopeId::ROOT);
|
||||
|
||||
entry.insert(ElementRef {
|
||||
// We know this is non-null because it comes from a reference
|
||||
|
||||
Reference in new issue
Block a user