Skip to content

Commit

Permalink
fix pages panic
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Jul 22, 2024
1 parent ae38bfc commit 47f3107
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pages/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ func (pg *Page) Init() {
for u, p := range pg.URLToPagePath {
if p == needsPath {
delete(pg.URLToPagePath, u)
w.FindPath(u).AsTree().Delete()
if n := w.FindPath(u); n != nil {
n.AsTree().Delete()
}
}
}
// open the default page if there is no currently open page
Expand Down

0 comments on commit 47f3107

Please sign in to comment.