From 591d2b19eadd6f9532f96d187fa5de5e4326f637 Mon Sep 17 00:00:00 2001 From: "Randall C. O'Reilly" Date: Mon, 23 Dec 2024 00:33:33 -0800 Subject: [PATCH] len(action) --- core/tree.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tree.go b/core/tree.go index d60096d3da..88ad0cc07f 100644 --- a/core/tree.go +++ b/core/tree.go @@ -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