mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +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() {
|
||||
// TODO: connectedCallback is fired in CE build
|
||||
// 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');
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ export class SplitPane implements ComponentInterface {
|
||||
async connectedCallback() {
|
||||
// TODO: connectedCallback is fired in CE build
|
||||
// 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');
|
||||
}
|
||||
this.styleChildren();
|
||||
|
Reference in New Issue
Block a user