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

Commit

Permalink
feat: auto-update preview on hlx3 only
Browse files Browse the repository at this point in the history
  • Loading branch information
rofe committed Aug 9, 2021
1 parent 981639f commit 51495d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sidekick/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@
// live
sk.add({
id: 'live',
condition: (sidekick) => sidekick.config.outerHost
condition: (sidekick) => (sidekick.config.hlx3 || sidekick.config.outerHost)
&& (sidekick.isEditor() || sidekick.isHelix()),
button: {
action: async (evt) => {
Expand Down Expand Up @@ -644,7 +644,7 @@
function addPublishPlugin(sk) {
sk.add({
id: 'publish',
condition: (sidekick) => sidekick.isHelix() && sidekick.config.host
condition: (sidekick) => sidekick.isHelix() && (sidekick.config.hlx3 || sidekick.config.host)
&& !(sidekick.config.byocdn && sidekick.location.host === sidekick.config.host),
button: {
action: async (evt) => {
Expand Down Expand Up @@ -1163,7 +1163,7 @@
envUrl = this.status.edit.url;
} else {
envUrl = `https://${this.config[hostType]}${this.status.webPath}`;
if (targetEnv === 'preview' && this.isEditor()) {
if (this.config.hlx3 && targetEnv === 'preview' && this.isEditor()) {
await this.update(this.status.webPath);
}
}
Expand Down

0 comments on commit 51495d0

Please sign in to comment.