In case of no mustache bindings are found in dynamic path list, throw invalid dynamic binding reference error. (#3394)
This commit is contained in:
parent
39e4990a7f
commit
20ed017a58
|
|
@ -346,6 +346,13 @@ public class LayoutActionServiceImpl implements LayoutActionService {
|
||||||
// Only extract mustache keys from leaf nodes
|
// Only extract mustache keys from leaf nodes
|
||||||
if (parent != null && isLeafNode) {
|
if (parent != null && isLeafNode) {
|
||||||
Set<String> mustacheKeysFromFields = MustacheHelper.extractMustacheKeysFromFields(parent);
|
Set<String> mustacheKeysFromFields = MustacheHelper.extractMustacheKeysFromFields(parent);
|
||||||
|
|
||||||
|
// We found the path. But if the path does not have any mustache bindings, throw the error
|
||||||
|
if (mustacheKeysFromFields.isEmpty()) {
|
||||||
|
throw new AppsmithException(AppsmithError.INVALID_DYNAMIC_BINDING_REFERENCE, widgetType,
|
||||||
|
widgetName, widgetId, fieldPath, pageId, layoutId);
|
||||||
|
}
|
||||||
|
|
||||||
dynamicBindings.addAll(mustacheKeysFromFields);
|
dynamicBindings.addAll(mustacheKeysFromFields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user