mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
fix(ssr): fix angular global window and document references
This commit is contained in:
@ -3,10 +3,10 @@ import { defineCustomElements } from '@ionic/core/loader';
|
||||
import { Config } from './providers/config';
|
||||
import { IonicWindow } from './types/interfaces';
|
||||
|
||||
export function appInitialize(config: Config) {
|
||||
export function appInitialize(config: Config, doc: Document) {
|
||||
return (): any => {
|
||||
const win: IonicWindow | undefined = window as any;
|
||||
if (typeof win !== 'undefined') {
|
||||
const win: IonicWindow | undefined = doc.defaultView as any;
|
||||
if (win) {
|
||||
const Ionic = win.Ionic = win.Ionic || {};
|
||||
|
||||
Ionic.config = config;
|
||||
|
Reference in New Issue
Block a user