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:
parent
e909b0466c
commit
9cf15b22c9
1 changed files with 2 additions and 2 deletions
|
@ -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 = {};
|
||||
|
|
Loading…
Reference in a new issue