Fix removing keybind-activated listeners

This commit is contained in:
Samuel Elliott 2018-08-01 21:17:36 +01:00
parent 16bb32b86c
commit a5ff8bbdb6
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ export default class KeybindSetting extends Setting {
// When there are no more keybind-activated listeners, remove the keybind setting from the set of active keybind settings
// Always remember to unbind keybind-activated listeners!
this.on('removeListener', (event, listener) => {
if (!this.listenerCount('keybind-activated')) instances.remove(this);
if (!this.listenerCount('keybind-activated')) instances.delete(this);
});
this.__keybind_activated = this.__keybind_activated.bind(this);