We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e532b4e commit fba3a84Copy full SHA for fba3a84
1 file changed
src/client/preview/index.js
@@ -12,8 +12,13 @@ import init from './init';
12
import { selectStory } from './actions';
13
import reducer from './reducer';
14
15
+// check if we're on storyshots
16
+const { navigator } = global;
17
+const isStoryShots = navigator && navigator.userAgent === 'storyshots';
18
+
19
// check whether we're running on node/browser
-const isBrowser = typeof window !== 'undefined';
20
+// storyshots got polyfills for window so need to make sure its not storyshots
21
+const isBrowser = typeof window !== 'undefined' && !isStoryShots;
22
23
const storyStore = new StoryStore();
24
const reduxStore = createStore(reducer);
0 commit comments