diff options
Diffstat (limited to 'lib/ui/stack.go')
-rw-r--r-- | lib/ui/stack.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ui/stack.go b/lib/ui/stack.go index d3722354..5ccf13bc 100644 --- a/lib/ui/stack.go +++ b/lib/ui/stack.go @@ -43,8 +43,7 @@ func (stack *Stack) Draw(ctx *Context) { func (stack *Stack) MouseEvent(localX int, localY int, event tcell.Event) { if len(stack.children) > 0 { - switch element := stack.Peek().(type) { - case Mouseable: + if element, ok := stack.Peek().(Mouseable); ok { element.MouseEvent(localX, localY, event) } } |