From bd75e2d5c948ba7174486c51f8360bc089bfa9d6 Mon Sep 17 00:00:00 2001 From: Vinicius Goulart Date: Wed, 30 Oct 2024 10:25:01 +0100 Subject: [PATCH] fix: prevent form editor from breaking on invalid expression on filepicker prop --- .../src/render/components/form-fields/FilePicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/form-js-viewer/src/render/components/form-fields/FilePicker.js b/packages/form-js-viewer/src/render/components/form-fields/FilePicker.js index 06f87188c..5f9973d4f 100644 --- a/packages/form-js-viewer/src/render/components/form-fields/FilePicker.js +++ b/packages/form-js-viewer/src/render/components/form-fields/FilePicker.js @@ -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); + const evaluatedAccept = useSingleLineTemplateEvaluation(accept, { debug: true }); const evaluatedMultiple = useBooleanExpressionEvaluation(multiple); const errorMessageId = `${domId}-error-message`; /** @type {File[]} */