Add check if cowebsite still exist before highlight

This commit is contained in:
Alexis Faizeau 2022-03-18 16:04:15 +01:00
parent c51fe1cfed
commit 15a0a2d1eb

View File

@ -619,7 +619,10 @@ class CoWebsiteManager {
setTimeout(() => {
this.fire();
}, animationTime);
} else if (!highlightedEmbed) {
} else if (
!highlightedEmbed &&
this.getCoWebsites().find((searchCoWebsite) => searchCoWebsite.getId() === coWebsite.getId())
) {
highlightedEmbedScreen.toggleHighlight({
type: "cowebsite",
embed: coWebsite,