Fix an incorrect return value of the EventDispatcher.off function (#1747)

This commit is contained in:
toasted-nutbread 2021-06-24 19:15:09 -04:00 committed by GitHub
parent 0556c50319
commit 1878b118fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {