Skip to content

Commit

Permalink
fix: eventBus error after dispose
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 committed May 3, 2024
1 parent 7ce2aa9 commit fe72738
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/eme.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ export const makeNewRequest = (player, requestOptions) => {
keySession.addEventListener(KEY_STATUSES_CHANGE, (event) => {
let expired = false;

if (!eventBus) {
return;
}
// Re-emit the keystatuseschange event with the entire keyStatusesMap
eventBus.trigger({
type: KEY_STATUSES_CHANGE,
Expand Down

0 comments on commit fe72738

Please sign in to comment.