Fix the missing once event handler after backbone removal. #5493

This commit is contained in:
Aditya Toshniwal 2022-11-28 13:46:12 +05:30 committed by GitHub
parent bbaf2ac46d
commit f828951fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,10 @@ export default class EventBus {
this.registerListener(...args);
}
once(...args) {
this.registerListener(...args, true);
}
deregisterListener(event, callback) {
if(callback) {
this._eventListeners = this._eventListeners.filter((e)=>{