Skip to content

Commit

Permalink
Return early on initial render
Browse files Browse the repository at this point in the history
The story isn't set until we receive the first channel event
  • Loading branch information
benoitdion committed Apr 17, 2019
1 parent 999dc03 commit d5d785d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/react-native/src/preview/components/StoryView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ export default class StoryView extends Component<Props, State> {
}

renderListening = () => {
if (!this.state) {
return null;
}
const { storyFn, selection } = this.state;
const { kind, story } = selection;

Expand Down

0 comments on commit d5d785d

Please sign in to comment.