Page MenuHomePhabricator

D11401.diff
No OneTemporary

D11401.diff

diff --git a/web/cashtab/src/components/Configure/Configure.js b/web/cashtab/src/components/Configure/Configure.js
--- a/web/cashtab/src/components/Configure/Configure.js
+++ b/web/cashtab/src/components/Configure/Configure.js
@@ -589,6 +589,15 @@
break;
}
}
+
+ // in the edge case of a fresh new wallet on a fresh new browser, remove the initialization entry to avoid an undefined contact in array
+ if (
+ tempContactListArray &&
+ tempContactListArray[0].address === undefined
+ ) {
+ tempContactListArray.shift();
+ }
+
// if address does not exist on the contact list, add it
if (!duplicateContact) {
tempContactListArray.push(newContactObj);
@@ -631,6 +640,15 @@
console.log('Error in getContactListFromLocalForage()');
console.log(err);
}
+
+ // in the edge case of a fresh new wallet on a fresh new browser, remove the initialization entry to avoid an undefined contact in array
+ if (
+ loadContactListStatus &&
+ loadContactListStatus[0].address === undefined
+ ) {
+ loadContactListStatus.shift();
+ }
+
setContactListArray(loadContactListStatus);
}
}, []);

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 26, 09:58 (1 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5573178
Default Alt Text
D11401.diff (1 KB)

Event Timeline