Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
beheh committed May 31, 2024
1 parent 978d20a commit 758a2fd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ private async Task Update(bool onlyVisiblePage = false)
return;
foreach(var box in ValidDecksOnPage)
{
if(box is null)
if(box?.DeckId is not long deckId)
continue;
if(deckboxes.TryGetValue(box.DeckId, out var deckData) && !_deckStatusByDeckstring[GameType].ContainsKey(deckData.Deckstring))
if(deckboxes.TryGetValue(deckId, out var deckData) && !_deckStatusByDeckstring[GameType].ContainsKey(deckData.Deckstring))
{
toLoad.Add(deckData.Deckstring);
_deckStatusByDeckstring[GameType][deckData.Deckstring] = SingleDeckState.LOADING;
Expand Down Expand Up @@ -386,7 +386,7 @@ ValidDecksOnPage is null ||
{
try
{
if(x is CollectionDeckBoxVisual box && deckMap.TryGetValue(box.DeckId, out var deckData))
if(x is CollectionDeckBoxVisual box && box.DeckId is long deckId && deckMap.TryGetValue(deckId, out var deckData))
{
// At this point we know the deck is valid for this format, so either fetch the API status or show NO_DATA
if(allDecks.TryGetValue(deckData.Deckstring, out var state))
Expand Down

0 comments on commit 758a2fd

Please sign in to comment.