Skip to content

Commit

Permalink
Merge pull request #10838 from storybookjs/fix/not-emit-when-viewmode…
Browse files Browse the repository at this point in the history
…-incompatible

UI: Don't emit storyChange event when viewmode not renderable by preview
  • Loading branch information
shilman authored May 19, 2020
2 parents e23ff36 + def3af5 commit 43448a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ui/src/components/preview/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const Preview: FunctionComponent<PreviewProps> = (props) => {
const tabs = useTabs(previewId, baseUrl, withLoader, getElements, story);

useEffect(() => {
if (story) {
if (story && viewMode && viewMode.match(/docs|story/)) {
const { refId, id } = story;
api.emit(SET_CURRENT_STORY, {
storyId: id,
Expand Down

0 comments on commit 43448a7

Please sign in to comment.