Skip to content

Commit 2fcdb94

Browse files
committed
setSpec after InputRangesTable in spec via URL
1 parent 0f1cb35 commit 2fcdb94

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/herbie/HerbieUI.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ function HerbieUIInner() {
159159
const urlSpec = new HerbieTypes.Spec(urlExpr, specId);
160160
const variables = fpcorejs.getVarnamesMathJS(urlExpr);
161161

162-
// TODO: do expression validation, see SpecComponent
163-
setSpec(urlSpec);
162+
164163

165164
// Get ranges from URL parameters if they exist
166165
const customRanges = getRangesFromURL(variables);
@@ -182,6 +181,9 @@ function HerbieUIInner() {
182181
utils.nextId(inputRangesTable)
183182
)]);
184183

184+
// TODO: do expression validation, see SpecComponent
185+
setSpec(urlSpec);
186+
185187
if (urlAlts !== null) {
186188
const alts: HerbieTypes.Expression[] = [];
187189
let expId = 0;

0 commit comments

Comments
 (0)