Skip to content

Commit

Permalink
Fix flow error
Browse files Browse the repository at this point in the history
  • Loading branch information
corrideat committed Jan 11, 2025
1 parent b61af0e commit b169626
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/model/getters.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ const getters: { [x: string]: (state: Object, getters: { [x: string]: any }) =>
currentGroupState (state) {
// The service worker should not be using this getter.
if (process.env.NODE_ENV === 'development' || process.env.CI) {
if (typeof Window !== 'function') {
// $FlowFixMe[cannot-resolve-name]
if (typeof Window === 'undefined') {
const error = new Error('Tried to access currentGroupState from outside a browsing context')
Promise.reject(error)
throw error
Expand Down

0 comments on commit b169626

Please sign in to comment.