Skip to content

Commit ecf4d38

Browse files
authored
Merge pull request #72 from hdavid16/master
Make remove_callback more robust
2 parents c77022b + 351a7f6 commit ecf4d38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/base.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ macro callback(expr::Expr)
5959
end
6060

6161
function remove_callback(cb::Function, ev::AbstractEvent)
62-
i = indexin(ev.bev.callbacks, [cb])[1]
62+
i = findfirst(x -> x == cb, ev.bev.callbacks)
6363
i != 0 && deleteat!(ev.bev.callbacks, i)
6464
end
6565

0 commit comments

Comments
 (0)