From 6b23aeb986adf669a12db80fa84a2dcefc27f9e6 Mon Sep 17 00:00:00 2001 From: "Franklin A. Toribio Maria" Date: Thu, 20 Feb 2020 20:57:15 -0400 Subject: [PATCH] Fixing verification on document.js - applyFormula Method --- model/document.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/model/document.js b/model/document.js index faa810ab..8e7c9bf7 100644 --- a/model/document.js +++ b/model/document.js @@ -435,6 +435,11 @@ module.exports = class BaseDocument extends Observable { .getMeta(tablefield.childtype) .getFormulaFields(); if (formulaFields.length) { + let value = this[tablefield.fieldname]; + //if this[table.fieldname] doesnt have value, skip it + if (value == null || value == undefined) + continue; + // for each row for (let row of this[tablefield.fieldname] || []) { for (let field of formulaFields) {