Skip to content

Commit aa914e3

Browse files
committed
Always load the new chip, then switch to the builtin if necessary. (#189)
Closes #187.
1 parent f0baaa4 commit aa914e3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

components/src/stores/chip.store.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -233,16 +233,15 @@ export function makeChipStore(
233233
this.setChip(CHIP_PROJECTS[project][0]);
234234
},
235235

236-
setChip(
236+
async setChip(
237237
chip: string,
238238
project = storage["/chip/project"] ?? ChipProjects["01"]
239239
) {
240240
chipName = storage["/chip/chip"] = chip;
241241
dispatch.current({ action: "setChip", payload: chipName });
242+
await this.loadChip(project, chipName);
242243
if (usingBuiltin) {
243244
this.useBuiltin();
244-
} else {
245-
this.loadChip(project, chipName);
246245
}
247246
},
248247

0 commit comments

Comments
 (0)