mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 13:01:01 +08:00
fix(menu, split-pane): ssr does not fail on null customElements check (#26854)
resolves #24714
This commit is contained in:
@ -173,7 +173,7 @@ export class Menu implements ComponentInterface, MenuI {
|
|||||||
async connectedCallback() {
|
async connectedCallback() {
|
||||||
// TODO: connectedCallback is fired in CE build
|
// TODO: connectedCallback is fired in CE build
|
||||||
// before WC is defined. This needs to be fixed in Stencil.
|
// before WC is defined. This needs to be fixed in Stencil.
|
||||||
if (typeof (customElements as any) !== 'undefined') {
|
if (typeof (customElements as any) !== 'undefined' && (customElements as any) != null) {
|
||||||
await customElements.whenDefined('ion-menu');
|
await customElements.whenDefined('ion-menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ export class SplitPane implements ComponentInterface {
|
|||||||
async connectedCallback() {
|
async connectedCallback() {
|
||||||
// TODO: connectedCallback is fired in CE build
|
// TODO: connectedCallback is fired in CE build
|
||||||
// before WC is defined. This needs to be fixed in Stencil.
|
// before WC is defined. This needs to be fixed in Stencil.
|
||||||
if (typeof (customElements as any) !== 'undefined') {
|
if (typeof (customElements as any) !== 'undefined' && (customElements as any) != null) {
|
||||||
await customElements.whenDefined('ion-split-pane');
|
await customElements.whenDefined('ion-split-pane');
|
||||||
}
|
}
|
||||||
this.styleChildren();
|
this.styleChildren();
|
||||||
|
Reference in New Issue
Block a user