Skip to content

Commit 93304c6

Browse files
committed
Automatically refresh if static template and a save happens
1 parent 3966f59 commit 93304c6

File tree

1 file changed

+5
-1
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Content/Preview

1 file changed

+5
-1
lines changed

packages/app/src/app/pages/Sandbox/Editor/Content/Preview/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,11 @@ class Preview extends Component<Props, State> {
196196
this.props.store.editor.currentSandbox.template
197197
).isServer;
198198
if ((isServer || !settings.livePreviewEnabled) && change) {
199-
preview.executeCodeImmediately();
199+
if (this.props.store.editor.currentSandbox.template === 'static') {
200+
preview.handleRefresh();
201+
} else {
202+
preview.executeCodeImmediately();
203+
}
200204
}
201205
};
202206

0 commit comments

Comments
 (0)