Skip to content

Commit bee02e0

Browse files
shinytang6catarak
authored andcommitted
bug fixes (#666)
1 parent 617f006 commit bee02e0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/modules/IDE/components/PreviewFrame.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ class PreviewFrame extends React.Component {
3131
}
3232

3333
componentDidUpdate(prevProps) {
34+
// if sketch starts or stops playing, want to rerender
35+
if (this.props.isPlaying !== prevProps.isPlaying) {
36+
this.renderSketch();
37+
return;
38+
}
39+
3440
// if the user explicitly clicks on the play button
3541
if (this.props.isPlaying && this.props.previewIsRefreshing) {
3642
this.renderSketch();

0 commit comments

Comments
 (0)