Skip to content

Commit

Permalink
fix(esl-media): update esl-media refresh handler to use consistent …
Browse files Browse the repository at this point in the history
…`isElement` check
  • Loading branch information
ala-n committed Aug 24, 2023
1 parent 905e7a8 commit d6f8855
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/modules/esl-media/core/esl-media.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {isElement} from '../../esl-utils/misc/object';
import {ExportNs} from '../../esl-utils/environment/export-ns';
import {ESLBaseElement} from '../../esl-base-element/core';
import {bind, prop, attr, boolAttr} from '../../esl-utils/decorators';
Expand Down Expand Up @@ -332,9 +333,7 @@ export class ESLMedia extends ESLBaseElement {
@bind
protected _onRefresh(e: Event): void {
const {target} = e;
if (target instanceof HTMLElement && target.contains(this)) {
this._onResize();
}
if (isElement(target) && target.contains(this)) this._onResize();
}

@bind
Expand Down

0 comments on commit d6f8855

Please sign in to comment.