Skip to content

Commit

Permalink
fix: default export value replaced with singleton accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
ala-n committed Feb 9, 2021
1 parent 155dbf9 commit ca323aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 0 additions & 2 deletions src/modules/esl-media/core/esl-media-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,3 @@ export class ESLMediaProviderRegistry extends Observable {
return new provider(media, config);
}
}

export default ESLMediaProviderRegistry.instance;
12 changes: 6 additions & 6 deletions src/modules/esl-media/core/esl-media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import {TraversingQuery} from '../../esl-traversing-query/core';

import {getIObserver} from './esl-media-iobserver';
import {BaseProvider, PlayerStates} from './esl-media-provider';
import ESLMediaRegistry from './esl-media-registry';
import MediaGroupRestrictionManager from './esl-media-manager';
import {ESLMediaProviderRegistry} from './esl-media-registry';
import {MediaGroupRestrictionManager} from './esl-media-manager';

@ExportNs('Media')
export class ESLMedia extends ESLBaseElement {
Expand Down Expand Up @@ -83,7 +83,7 @@ export class ESLMedia extends ESLBaseElement {
}

static supports(name: string): boolean {
return ESLMediaRegistry.has(name);
return ESLMediaProviderRegistry.instance.has(name);
}

protected connectedCallback() {
Expand All @@ -92,7 +92,7 @@ export class ESLMedia extends ESLBaseElement {
this.setAttribute('role', 'application');
}
this.innerHTML += '<!-- Inner Content, do not modify it manually -->';
ESLMediaRegistry.addListener(this._onRegistryStateChange);
ESLMediaProviderRegistry.instance.addListener(this._onRegistryStateChange);
if (this.conditionQuery) {
this.conditionQuery.addListener(this.deferredReinitialize);
}
Expand All @@ -105,7 +105,7 @@ export class ESLMedia extends ESLBaseElement {

protected disconnectedCallback() {
super.disconnectedCallback();
ESLMediaRegistry.removeListener(this._onRegistryStateChange);
ESLMediaProviderRegistry.instance.removeListener(this._onRegistryStateChange);
if (this.conditionQuery) {
this.conditionQuery.removeListener(this.deferredReinitialize);
}
Expand Down Expand Up @@ -154,7 +154,7 @@ export class ESLMedia extends ESLBaseElement {
this._provider = null;

if (this.canActivate()) {
this._provider = ESLMediaRegistry.createFor(this);
this._provider = ESLMediaProviderRegistry.instance.createFor(this);
if (this._provider) {
this._provider.bind();
console.debug('[ESL] Media provider bound', this._provider);
Expand Down
4 changes: 2 additions & 2 deletions src/modules/esl-utils/async/test/throttle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ describe('async/throttle', () => {
throttled();
expect(fn).toBeCalledTimes(3);
done();
}, 150);
}, 250);
}, 200);
}, 300);

test('test context', () => {
const fn = function () { return this; };
Expand Down

0 comments on commit ca323aa

Please sign in to comment.