@accordproject/template-engine 2.7.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/dist/worker.js.map +1 -1
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -889,7 +889,12 @@ async function generateAgreement(modelManager, clauseLibrary, templateMark, data
|
|
|
889
889
|
delete context.dependencies;
|
|
890
890
|
delete context.functionName;
|
|
891
891
|
} else if (CLAUSE_DEFINITION_RE.test(nodeClass)) {
|
|
892
|
-
|
|
892
|
+
const path = getJsonPath(templateMark, context, this.path);
|
|
893
|
+
const variableValues = jp.query(data, path, 1);
|
|
894
|
+
if (context.name !== "top" && (variableValues.length === 0 || variableValues[0] === void 0 || variableValues[0] === null)) {
|
|
895
|
+
delete context.nodes;
|
|
896
|
+
stopHere = true;
|
|
897
|
+
} else if (context.condition) {
|
|
893
898
|
checkCode(context.condition);
|
|
894
899
|
const result = !!userCodeResults[this.path.join("/")];
|
|
895
900
|
if (!result) {
|