Skip to content

Commit

Permalink
fix: don't redirect if splash
Browse files Browse the repository at this point in the history
  • Loading branch information
QuiiBz committed Aug 31, 2024
1 parent 2323f6b commit f1e65cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/dashboard/src/stores/elementsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ export const useElementsStore = create<ElementsState>()(
},
loadImage: (imageId) => {
const item = localStorage.getItem(imageId);
if (!item) {
if (!item && imageId !== "splash") {
return false;
}

const elements = JSON.parse(item) as OGElement[];
const elements = JSON.parse(item ?? "[]") as OGElement[];
set({ imageId, elements, selectedElementId: null });

// Immediately load fonts for elements that will be visible on the page.
Expand Down

0 comments on commit f1e65cb

Please sign in to comment.