diff --git a/pkg/app/component.go b/pkg/app/component.go index 3021d0938..7db4ac662 100644 --- a/pkg/app/component.go +++ b/pkg/app/component.go @@ -408,12 +408,12 @@ func (c *Compo) replaceRoot(v UI) error { Wrap(err) } - var parent UI + parent := c.getParent() for { - parent = c.getParent() if parent == nil || parent.Kind() == HTML { break } + parent = parent.getParent() } if parent == nil {