Fix window reference error with SSR (#348)

This commit is contained in:
Andrew Prifer 2022-12-05 11:50:53 +01:00 committed by GitHub
parent a9adc2640c
commit 3257ac89b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,9 +74,12 @@ function registerStudioBundle() {
export {default as ToolbarDropdownSelect} from './uiComponents/toolbar/ToolbarDropdownSelect' export {default as ToolbarDropdownSelect} from './uiComponents/toolbar/ToolbarDropdownSelect'
import {notify} from '@theatre/studio/notify' import {notify} from '@theatre/studio/notify'
// @ts-ignore
window[globalVariableNames.notifications] = { if (typeof window !== 'undefined') {
notify, // @ts-ignore
window[globalVariableNames.notifications] = {
notify,
}
} }
export type {IScrub} from '@theatre/studio/Scrub' export type {IScrub} from '@theatre/studio/Scrub'