Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ed65046

Browse files
shinytang6catarak
authored andcommitted
minor tweak
1 parent 244af76 commit ed65046

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

client/modules/IDE/components/PreviewFrame.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class PreviewFrame extends React.Component {
2727
super(props);
2828
this.handleConsoleEvent = this.handleConsoleEvent.bind(this);
2929
this.state = {
30-
changed: false
30+
toggle: false
3131
};
3232
}
3333

@@ -311,7 +311,9 @@ class PreviewFrame extends React.Component {
311311
}
312312

313313
renderSketch() {
314-
this.state.changed = !this.state.changed;
314+
this.setState({
315+
toggle: !this.state.toggle
316+
});
315317
if (this.props.endSketchRefresh) {
316318
this.props.endSketchRefresh();
317319
}
@@ -323,7 +325,7 @@ class PreviewFrame extends React.Component {
323325
<Frame
324326
className="preview-frame"
325327
initialContent={this.injectLocalFiles()}
326-
key={this.state.changed}
328+
key={this.state.toggle}
327329
>
328330
<FrameContextConsumer>
329331
{

0 commit comments

Comments
 (0)