Skip to content

Commit

Permalink
Check store for addons when using my link (#13352)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Aug 7, 2022
1 parent 12239d7 commit 0d5b86e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hassio/src/addon-view/hassio-addon-dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import "../../../src/components/ha-circular-progress";
import {
fetchAddonInfo,
fetchHassioAddonInfo,
fetchHassioAddonsInfo,
HassioAddonDetails,
} from "../../../src/data/hassio/addon";
import { extractApiErrorMessage } from "../../../src/data/hassio/common";
Expand Down Expand Up @@ -209,8 +208,8 @@ class HassioAddonDashboard extends LitElement {
}

if (requestedAddon) {
const addonsInfo = await fetchHassioAddonsInfo(this.hass);
const validAddon = addonsInfo.addons.some(
const store = await fetchSupervisorStore(this.hass);
const validAddon = store.addons.some(
(addon) => addon.slug === requestedAddon
);
if (!validAddon) {
Expand Down

0 comments on commit 0d5b86e

Please sign in to comment.