Skip to content

Commit

Permalink
fix: prevent form editor from breaking on invalid expression on filep…
Browse files Browse the repository at this point in the history
…icker prop
  • Loading branch information
vsgoulart committed Oct 30, 2024
1 parent 52d473e commit 9837135
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function FilePicker(props) {
const { field, onChange, domId, errors = [], disabled, readonly, required, value: filesKey = '' } = props;
const { label, multiple = false, accept = '' } = field;
/** @type {string} */
const evaluatedAccept = useSingleLineTemplateEvaluation(accept);

This comment has been minimized.

Copy link
@nikku

nikku Oct 30, 2024

Member

Could you share what this does, and why it fixes the issue?

This comment has been minimized.

Copy link
@nikku

nikku Oct 30, 2024

Member

I do see it in a bunch of places, but I don't see any test case attached that verifies the fix.

const evaluatedAccept = useSingleLineTemplateEvaluation(accept, { debug: true });
const evaluatedMultiple = useBooleanExpressionEvaluation(multiple);
const errorMessageId = `${domId}-error-message`;
/** @type {File[]} */
Expand Down

0 comments on commit 9837135

Please sign in to comment.