From a0db2c881cb6e1823346a67144dce5e532caab82 Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 7 Dec 2025 18:41:01 +0100 Subject: [PATCH] Fix null check for `destOfCurPremisses` in destination update logic in `destinationEdit.js`. --- src/frontend/src/store/destinationEdit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/store/destinationEdit.js b/src/frontend/src/store/destinationEdit.js index 5c69a4e..e15fc31 100644 --- a/src/frontend/src/store/destinationEdit.js +++ b/src/frontend/src/store/destinationEdit.js @@ -159,7 +159,7 @@ export const useDestinationEditStore = defineStore('destinationEdit', { if ((destOfCurPremisses ?? null) !== null) { const destOfCurPremise = destOfCurPremisses.find(d => destinationUpdateInfo.destinationNodeId === d.destination_node.id); - if(destinationUpdateInfo.ids.includes(destOfCurPremise.id)) { + if(destOfCurPremisses && destinationUpdateInfo.ids.includes(destOfCurPremise?.id)) { /* set d2d stuff */ destOfCurPremise.is_d2d = destinationUpdateInfo.isD2d; destOfCurPremise.rate_d2d = destinationUpdateInfo.rateD2d;