mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 17:42:15 +08:00
fix(react): setupIonicReact no longer crashes in SSR environment (#24604)
This commit is contained in:
@ -197,7 +197,9 @@ export const setupIonicReact = (config: IonicConfig = {}) => {
|
||||
* TODO: Remove when all integrations have been
|
||||
* migrated to CE build.
|
||||
*/
|
||||
document.documentElement.classList.add('ion-ce');
|
||||
if (typeof (document as any) !== 'undefined') {
|
||||
document.documentElement.classList.add('ion-ce');
|
||||
}
|
||||
|
||||
initialize({
|
||||
...config
|
||||
|
Reference in New Issue
Block a user