Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
parthpanchal123 committed Oct 18, 2021
1 parent 606a552 commit 37775fd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,13 @@ const showalert = (linkData) => {

const loadAllFromLocalStorage = () => {
// An array for custom fields
let customFields = JSON.parse(localStorage.getItem("customFields"));
let customFields = JSON.parse(localStorage.getItem("customFields")) ?? [];

customFields.forEach((field) => {
loadCustomFieldsFromLocalStorage(field);
});
if (customFields.length != 0) {
customFields.forEach((field) => {
loadCustomFieldsFromLocalStorage(field);
});
}

const gitLinkData = localStorage.getItem("Github");
const linkedInLinkData = localStorage.getItem("Linkedin");
Expand Down

0 comments on commit 37775fd

Please sign in to comment.