Fix an incorrect return value of the EventDispatcher.off function (#1747)
This commit is contained in:
parent
0556c50319
commit
1878b118fb
@ -426,7 +426,7 @@ class EventDispatcher {
|
|||||||
*/
|
*/
|
||||||
off(eventName, callback) {
|
off(eventName, callback) {
|
||||||
const callbacks = this._eventMap.get(eventName);
|
const callbacks = this._eventMap.get(eventName);
|
||||||
if (typeof callbacks === 'undefined') { return true; }
|
if (typeof callbacks === 'undefined') { return false; }
|
||||||
|
|
||||||
const ii = callbacks.length;
|
const ii = callbacks.length;
|
||||||
for (let i = 0; i < ii; ++i) {
|
for (let i = 0; i < ii; ++i) {
|
||||||
|
Loading…
Reference in New Issue
Block a user