Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ class App extends React.Component<
super(props);

// Get tabs config from local storage
const tabsString = getLocalStorageDataFromKey(LOCALSTORAGE_KEYS.tabs, null);
const tabsData = getLocalStorageDataFromKey(LOCALSTORAGE_KEYS.tabs, null);
let tabs: TabItemConfig[] = [];
try {
tabs = JSON.parse(tabsString);
if (!Array.isArray(tabs)) {
throw new Error("Could not parse marketplace tabs key");
}
Expand All @@ -59,6 +58,8 @@ class App extends React.Component<
if (tabs.filter((tab) => !tab).length > 0) {
throw new Error("Falsey marketplace tabs key");
}

tabs = tabsData;
} catch {
tabs = ALL_TABS;
localStorage.setItem(LOCALSTORAGE_KEYS.tabs, JSON.stringify(tabs));
Expand Down