mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-14 10:00:29 +00:00
Merge pull request #349 from zachlankton/harpoon2-fix-list-remove-bug
add self.config default item in remove function
This commit is contained in:
commit
901e58c04b
@ -79,6 +79,7 @@ end
|
|||||||
|
|
||||||
---@return HarpoonList
|
---@return HarpoonList
|
||||||
function HarpoonList:remove(item)
|
function HarpoonList:remove(item)
|
||||||
|
item = item or self.config.add(self.config)
|
||||||
for i, v in ipairs(self.items) do
|
for i, v in ipairs(self.items) do
|
||||||
if self.config.equals(v, item) then
|
if self.config.equals(v, item) then
|
||||||
Listeners.listeners:emit(
|
Listeners.listeners:emit(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user