Skip to content
Permalink
Browse files

update deck changes only if the deck has changed

  • Loading branch information...
Manuel-777 committed May 26, 2019
1 parent e406c40 commit 8771d8c71d54bb62b5e030f1036fdacde8143ea3
Showing with 6 additions and 4 deletions.
  1. +6 −4 window_background/labels.js
@@ -396,11 +396,13 @@ function onLabelInDeckUpdateDeck(entry, json) {
});

if (!deck_changes_index.includes(changeId)) {
deck_changes_index.push(changeId);
deck_changes[changeId] = deltaDeck;
if (deltaDeck.changesMain.length > 0 || deltaDeck.changesSide.length > 0) {
deck_changes_index.push(changeId);
deck_changes[changeId] = deltaDeck;

store.set("deck_changes_index", deck_changes_index);
store.set("deck_changes." + changeId, deltaDeck);
store.set("deck_changes_index", deck_changes_index);
store.set("deck_changes." + changeId, deltaDeck);
}
}
}
});

0 comments on commit 8771d8c

Please sign in to comment.
You can’t perform that action at this time.