Commit fd6e6323 authored by timel's avatar timel Committed by Chunchi Che

fix: deck doesnt exist

parent 70713eae
...@@ -24,6 +24,10 @@ export const DeckManager = _objToMap( ...@@ -24,6 +24,10 @@ export const DeckManager = _objToMap(
export async function fetchDeck(deck: string): Promise<IDeck> { export async function fetchDeck(deck: string): Promise<IDeck> {
const res = DeckManager.get(deck); const res = DeckManager.get(deck);
if (!res) {
console.error(`Deck ${deck} doesn't exist.`);
}
return res ?? { deckName: "undefined", main: [], extra: [], side: [] }; return res ?? { deckName: "undefined", main: [], extra: [], side: [] };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment