From fe727381145bbe87c3a54e8ea36cfccedebac2f9 Mon Sep 17 00:00:00 2001 From: Adam Waldron Date: Fri, 3 May 2024 10:01:39 -0700 Subject: [PATCH] fix: eventBus error after dispose --- src/eme.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/eme.js b/src/eme.js index f88ad24..16d2af9 100644 --- a/src/eme.js +++ b/src/eme.js @@ -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,