mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
refactor: remove extra typescript dependency (#28220)
This commit is contained in:
@ -95,6 +95,7 @@ export const createOverlay = <T extends HTMLIonOverlayElement>(
|
||||
tagName: string,
|
||||
opts: object | undefined
|
||||
): Promise<T> => {
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
||||
if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined') {
|
||||
return window.customElements.whenDefined(tagName).then(() => {
|
||||
const element = document.createElement(tagName) as HTMLIonOverlayElement;
|
||||
|
Reference in New Issue
Block a user