diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index dd6f9a94..21bf157d 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -2,4 +2,4 @@ export { SquiggleChart } from "./components/SquiggleChart"; export { SquiggleEditor } from "./components/SquiggleEditor"; export { SquigglePlayground } from "./components/SquigglePlayground"; export { SquiggleContainer } from "./components/SquiggleContainer"; -export * as squiggle from "@quri/squiggle-lang" +export * as squiggle from "@quri/squiggle-lang"; diff --git a/packages/components/src/lib/hooks/useSquiggle.ts b/packages/components/src/lib/hooks/useSquiggle.ts index e6336eea..15bf89bd 100644 --- a/packages/components/src/lib/hooks/useSquiggle.ts +++ b/packages/components/src/lib/hooks/useSquiggle.ts @@ -17,9 +17,9 @@ export const useSquiggle = (args: SquiggleArgs) => { const result = useMemo( () => { const project = args.project; - let code = project.getSource(args.sourceName) - if(args.code) { - code = args.code + let code = project.getSource(args.sourceName); + if (args.code) { + code = args.code; } project.setSource(args.sourceName, code ?? ""); let includes = args.includes; @@ -29,7 +29,7 @@ export const useSquiggle = (args: SquiggleArgs) => { if (args.jsImports && Object.keys(args.jsImports).length) { const importsSource = jsImportsToSquiggleCode(args.jsImports); project.setSource("imports", importsSource); - includes.push("imports") + includes.push("imports"); } project.setContinues(args.sourceName, includes); project.run(args.sourceName);