Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Commit

Permalink
fix: auto-update on switch from editor to preview
Browse files Browse the repository at this point in the history
  • Loading branch information
rofe committed Aug 8, 2021
1 parent df5de28 commit ce32f06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sidekick/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@
} else {
envUrl = `https://${this.config[hostType]}${this.status.webPath}`;
if (targetEnv === 'preview' && this.isEditor()) {
this.update(this.status.webPath);
await this.update(this.status.webPath);
}
}
if (!envUrl) {
Expand Down Expand Up @@ -1197,7 +1197,7 @@
} else {
resp = await this.publish(path, true);
}
if (this.isInner() || this.isDev()) {
if (this.isEditor() || this.isInner() || this.isDev()) {
// bust client cache
await fetch(`https://${config.innerHost}${path}`, { cache: 'reload', mode: 'no-cors' });
}
Expand Down

0 comments on commit ce32f06

Please sign in to comment.