@@ -175,7 +175,7 @@ module.exports = app => {
ln[prop] = 0;
}
insertLedgerData.push(ln);
- if (node.detail) {
+ if (node.detail && node.detail.length > 0) {
for (const [i, d] of node.detail.entries()) {
const idd = {
id: this.uuid.v4(), tender_id: stage.tid, stage_id: stage.id,