Skip to content

Commit ec0b0d6

Browse files
authored
fix(core): command remove out of bound (#2506)
1 parent 2d1c52b commit ec0b0d6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/core/command.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ func (c *Commands) Remove(namespace, verb string) {
186186
for i := range c.commands {
187187
if c.commands[i].Namespace == namespace && c.commands[i].Verb == verb {
188188
c.commands = append(c.commands[:i], c.commands[i+1:]...)
189+
return
189190
}
190191
}
191192
}

0 commit comments

Comments
 (0)