Fix window reference error with SSR (#348)
This commit is contained in:
parent
a9adc2640c
commit
3257ac89b9
1 changed files with 6 additions and 3 deletions
|
@ -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'
|
||||||
|
|
Loading…
Reference in a new issue