diff --git a/components/src/stores/chip.store.ts b/components/src/stores/chip.store.ts index c92d12540..fdcac8885 100644 --- a/components/src/stores/chip.store.ts +++ b/components/src/stores/chip.store.ts @@ -233,16 +233,15 @@ export function makeChipStore( this.setChip(CHIP_PROJECTS[project][0]); }, - setChip( + async setChip( chip: string, project = storage["/chip/project"] ?? ChipProjects["01"] ) { chipName = storage["/chip/chip"] = chip; dispatch.current({ action: "setChip", payload: chipName }); + await this.loadChip(project, chipName); if (usingBuiltin) { this.useBuiltin(); - } else { - this.loadChip(project, chipName); } },