Skip to content

Commit

Permalink
chore: api
Browse files Browse the repository at this point in the history
  • Loading branch information
prevwong committed Apr 2, 2024
1 parent 5f4f35a commit 1c07252
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ export const EachTemplateSettings = observer(
className="flex-1"
value={alias}
onCommit={(value) => {
const expr = Parser.parseExpression(value, t.Identifier);
const expr = Parser.parseExpression(value, {
expected: t.Identifier,
});
setAliasValue(expr.name);
commitValue(
props.template.each?.iterator ?? null,
Expand Down Expand Up @@ -155,7 +157,9 @@ export const EachTemplateSettings = observer(
});
}}
onCommit={(value) => {
const expr = Parser.parseExpression(value, t.Identifier);
const expr = Parser.parseExpression(value, {
expected: t.Identifier,
});
setIndexValue(expr.name);
commitValue(
props.template.each?.iterator ?? null,
Expand Down

0 comments on commit 1c07252

Please sign in to comment.