Skip to content

Commit

Permalink
Always load the new chip, then switch to the builtin if necessary. (#189
Browse files Browse the repository at this point in the history
)

Closes #187.
  • Loading branch information
DavidSouther committed Feb 6, 2023
1 parent f0baaa4 commit aa914e3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/src/stores/chip.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
},

Expand Down

0 comments on commit aa914e3

Please sign in to comment.