I've just ran into a situation in which, for some reason (can add the specific use case, if needed), I ended up calling beacon.die() on the same beacon.
I was expecting it to either be an error or a no-op, but instead what I noticed is that it killed the beacon in question, as well as some other totally unrelated beacon that was also active.
The culprit is most likely this line. I believe we should check if indexOf returns -1, instead of blindly splicing the array.
I've just ran into a situation in which, for some reason (can add the specific use case, if needed), I ended up calling
beacon.die()
on the same beacon.I was expecting it to either be an error or a no-op, but instead what I noticed is that it killed the beacon in question, as well as some other totally unrelated beacon that was also active.
The culprit is most likely this line. I believe we should check if
indexOf
returns-1
, instead of blindly splicing the array.