Fix cowebsite swap

This commit is contained in:
Alexis Faizeau
2022-02-15 11:54:58 +01:00
parent 0f16d909e7
commit a52ad233d8
+8
View File
@@ -159,9 +159,17 @@ class CoWebsiteManager {
}); });
buttonSwipe.addEventListener("click", () => { buttonSwipe.addEventListener("click", () => {
const mainCoWebsite = this.getMainCoWebsite();
const highlightedEmbed = get(highlightedEmbedScreen); const highlightedEmbed = get(highlightedEmbedScreen);
if (highlightedEmbed?.type === "cowebsite") { if (highlightedEmbed?.type === "cowebsite") {
this.goToMain(highlightedEmbed.embed); this.goToMain(highlightedEmbed.embed);
if (mainCoWebsite) {
highlightedEmbedScreen.toggleHighlight({
type: "cowebsite",
embed: mainCoWebsite,
});
}
} }
}); });
} }