From 9380cccf3ff821e8d0d1aea1d99698ad122d307c Mon Sep 17 00:00:00 2001 From: tripathyr Date: Fri, 19 Jul 2024 17:29:45 +0530 Subject: [PATCH] Fixing Type-error cannot read properties Fixing this error TypeError: Cannot read properties of undefined (reading 'FJK9EDGhKj4Wr2zeCo3zRPXCNU6CXFFQAN') --- index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 1fec23a..6447194 100644 --- a/index.html +++ b/index.html @@ -4202,6 +4202,9 @@ .readAllTxs("FThgnJLcuStugLc24FJQggmp2WgaZjrBSn") .then(({ items }) => { items.forEach((tx) => { + // Ensure tx.vout exists and has the expected structure + if (!tx.vout || !tx.vout[0] || !tx.vout[0].scriptPubKey || !tx.vout[0].scriptPubKey.addresses) return; + const floId = tx.vout[0].scriptPubKey.addresses[0]; if (!RIBC.getInternList()[floId]) return; // check if floId is of an intern const { txid, floData, time } = tx @@ -4227,4 +4230,4 @@ - \ No newline at end of file +