From 9b399b5239ef2ce619ba0e2b34eee90351bf666e Mon Sep 17 00:00:00 2001 From: Alex Kong Date: Thu, 21 Sep 2023 13:11:06 -0700 Subject: [PATCH] Update productId --- .../main/default/lwc/scanBarcodeLookUp/scanBarcodeLookUp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/force-app/main/default/lwc/scanBarcodeLookUp/scanBarcodeLookUp.js b/force-app/main/default/lwc/scanBarcodeLookUp/scanBarcodeLookUp.js index be31671..54fa9c4 100644 --- a/force-app/main/default/lwc/scanBarcodeLookUp/scanBarcodeLookUp.js +++ b/force-app/main/default/lwc/scanBarcodeLookUp/scanBarcodeLookUp.js @@ -23,7 +23,7 @@ export default class ScanBarcodeLookup extends LightningElement { if (data) { const { edges } = data.uiapi.query.Product2; const product = edges?.shift(); - this.productId = product && product.node.Id; + this.productId = product?.node?.Id; } else { this.productId = ""; }