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,10 +74,13 @@ function registerStudioBundle() {
export {default as ToolbarDropdownSelect} from './uiComponents/toolbar/ToolbarDropdownSelect'
import {notify} from '@theatre/studio/notify'
if (typeof window !== 'undefined') {
// @ts-ignore
window[globalVariableNames.notifications] = {
notify,
}
}
export type {IScrub} from '@theatre/studio/Scrub'
export type {