0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-01-14 16:28:42 -05:00

fix event off function comparing

This commit is contained in:
loque 2021-06-15 15:32:57 -05:00
parent e909b0466c
commit 9cf15b22c9

View file

@ -62,7 +62,7 @@ var Common = require('./Common');
if (callback && callbacks) {
for (var j = 0; j < callbacks.length; j++) {
if (callbacks[j] !== callback)
if (callbacks[j].toString() !== callback.toString())
newCallbacks.push(callbacks[j]);
}
}
@ -85,7 +85,7 @@ var Common = require('./Common');
eventClone;
var events = object.events;
if (events && Common.keys(events).length > 0) {
if (!event)
event = {};