From edc686acdc5bda82a9205bbb437902b3f14f73d5 Mon Sep 17 00:00:00 2001 From: odeimaiz Date: Wed, 15 Jan 2025 15:52:08 +0100 Subject: [PATCH] one more check --- .../source/class/osparc/desktop/credits/CheckoutsTableModel.js | 2 +- .../source/class/osparc/desktop/credits/PurchasesTableModel.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/desktop/credits/CheckoutsTableModel.js b/services/static-webserver/client/source/class/osparc/desktop/credits/CheckoutsTableModel.js index 61636f893b1..8297259c9ec 100644 --- a/services/static-webserver/client/source/class/osparc/desktop/credits/CheckoutsTableModel.js +++ b/services/static-webserver/client/source/class/osparc/desktop/credits/CheckoutsTableModel.js @@ -134,7 +134,7 @@ qx.Class.define("osparc.desktop.credits.CheckoutsTableModel", { checkoutsItems.forEach(checkoutsItem => { const licensedItemId = checkoutsItem["licensedItemId"]; const licensedItem = licensedItems.find(licItem => licItem["licensedItemId"] === licensedItemId); - const vipModel = vipModels.find(vipMdl => vipMdl["modelId"] == licensedItem["name"]); + const vipModel = vipModels.find(vipMdl => licensedItem && (vipMdl["modelId"] == licensedItem["name"])); data.push({ [checkoutsCols.PURCHASE_ID.id]: checkoutsItem["licensedItemPurchaseId"], [checkoutsCols.ITEM_ID.id]: licensedItemId, diff --git a/services/static-webserver/client/source/class/osparc/desktop/credits/PurchasesTableModel.js b/services/static-webserver/client/source/class/osparc/desktop/credits/PurchasesTableModel.js index 04ff324c81e..e6a168083ac 100644 --- a/services/static-webserver/client/source/class/osparc/desktop/credits/PurchasesTableModel.js +++ b/services/static-webserver/client/source/class/osparc/desktop/credits/PurchasesTableModel.js @@ -134,7 +134,7 @@ qx.Class.define("osparc.desktop.credits.PurchasesTableModel", { purchasesItems.forEach(purchasesItem => { const licensedItemId = purchasesItem["licensedItemId"]; const licensedItem = licensedItems.find(licItem => licItem["licensedItemId"] === licensedItemId); - const vipModel = vipModels.find(vipMdl => vipMdl["modelId"] == licensedItem["name"]); + const vipModel = vipModels.find(vipMdl => licensedItem && (vipMdl["modelId"] == licensedItem["name"])); data.push({ [purchasesCols.PURCHASE_ID.id]: purchasesItem["licensedItemPurchaseId"], [purchasesCols.ITEM_ID.id]: licensedItemId,