Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13710981
D11401.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D11401.diff
View Options
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
Details
Attached
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)
Attached To
D11401: [Cashtab] Fresh browser/wallet fix for contact list
Event Timeline
Log In to Comment