Skip to content

Commit

Permalink
hides accordions when an error is given
Browse files Browse the repository at this point in the history
  • Loading branch information
joaovictor3g committed Apr 24, 2024
1 parent 1f4a10e commit 9d64423
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@

import { setCost } from "./utils/render-functions.js";
import { AceEditor } from "./editor.js";
import { handleRenderAccordions } from "./components/accordions/result.js";
import {
handleRenderAccordions,
hideAccordions,
} from "./components/accordions/result.js";
import { localStorageModeKey } from "./constants.js";
import { setEditorTheme } from "./theme.js";
import { getExprEditorValue, getInputEditorValue } from "./utils/editor.js";
Expand Down Expand Up @@ -68,6 +71,7 @@ function run() {
if (isError) {
output.value = resultOutput;
output.style.color = "red";
hideAccordions();
} else {
const obj = JSON.parse(resultOutput);
const resultCost = obj?.cost;
Expand Down

0 comments on commit 9d64423

Please sign in to comment.