Skip to content

Commit

Permalink
Compile hdl on page enter and after reset (#250)
Browse files Browse the repository at this point in the history
* Fix bug where hdl errors are ignored after reset
* Don't try to compile builtin code
  • Loading branch information
netalondon authored Mar 26, 2024
1 parent aeaa2fc commit 256ce23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/src/pages/chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ export const Chip = () => {

const compile = useRef<(files?: Partial<Files>) => void>(() => undefined);
compile.current = async (files: Partial<Files> = {}) => {
const hdlToCompile =
useBuiltin || state.controls.builtinOnly ? files.hdl : files.hdl ?? hdl;
await actions.updateFiles({
hdl: files.hdl,
hdl: hdlToCompile,
tst: files.tst ?? tst,
cmp: files.cmp ?? cmp,
});
Expand Down

0 comments on commit 256ce23

Please sign in to comment.