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

pull/5582/head
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
1 changed files with 4 additions and 0 deletions

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