Prevent crash when determining datasource schema for non string type values

This commit is contained in:
Andrew Kingston 2022-10-15 12:58:32 +01:00
parent 7d40c0056a
commit 72ff7ce122
1 changed files with 4 additions and 1 deletions

View File

@ -1004,7 +1004,10 @@ const bindingReplacement = (
* {{ literal [componentId] }}
*/
const extractLiteralHandlebarsID = value => {
return value?.match(/{{\s*literal\s*\[+([^\]]+)].*}}/)?.[1]
if (!value || typeof value !== "string") {
return null
}
return value.match(/{{\s*literal\s*\[+([^\]]+)].*}}/)?.[1]
}
/**