Skip to content

Commit

Permalink
len(action)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoreilly committed Dec 23, 2024
1 parent bf5af6b commit 591d2b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ func (tr *Tree) contextMenu(m *Scene) {
// creating an error snackbar if it is and action is non-empty.
func (tr *Tree) IsRoot(action ...string) bool {
if tr.This == tr.Root.AsCoreTree().This {
if len(action) == 1 {
if len(action) > 0 {
MessageSnackbar(tr, fmt.Sprintf("Cannot %v the root of the tree", action[0]))
}
return true
Expand Down

0 comments on commit 591d2b1

Please sign in to comment.