Skip to content

Commit

Permalink
Fix window reference error with SSR (theatre-js#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPrifer authored Dec 5, 2022
1 parent a9adc26 commit 3257ac8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions theatre/studio/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ function registerStudioBundle() {
export {default as ToolbarDropdownSelect} from './uiComponents/toolbar/ToolbarDropdownSelect'

import {notify} from '@theatre/studio/notify'
// @ts-ignore
window[globalVariableNames.notifications] = {
notify,

if (typeof window !== 'undefined') {
// @ts-ignore
window[globalVariableNames.notifications] = {
notify,
}
}

export type {IScrub} from '@theatre/studio/Scrub'
Expand Down

0 comments on commit 3257ac8

Please sign in to comment.