Skip to content

Commit

Permalink
fix(FEC-12596): Related plugin doesn't load because of an exception (#…
Browse files Browse the repository at this point in the history
…667)

Rename fake-event-target logger to not conflict with children.

Resolves FEC-12596.
  • Loading branch information
SivanA-Kaltura committed Sep 28, 2022
1 parent 788d983 commit 6f799ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/event/fake-event-target.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import getLogger from '../utils/logger';
class FakeEventTarget {
_listeners: MultiMap<string, (event: FakeEvent) => boolean | void>;
dispatchTarget: FakeEventTarget;
logger: any;
__logger: any;

constructor() {
/**
Expand All @@ -28,7 +28,7 @@ class FakeEventTarget {
* @type {FakeEventTarget}
*/
this.dispatchTarget = this;
this.logger = getLogger('FakeEventTarget');
this.__logger = getLogger('FakeEventTarget');
}

/**
Expand Down Expand Up @@ -98,7 +98,7 @@ class FakeEventTarget {
// Exceptions during event handlers should not affect the caller,
// but should appear on the console as uncaught, according to MDN:
// http://goo.gl/N6Ff27
this.logger.error(`Error occurred when handling event: ${event.type}.`, exception);
this.__logger.error(`Error occurred when handling event: ${event.type}.`, exception);
}

if (event.stopped) {
Expand Down

0 comments on commit 6f799ad

Please sign in to comment.