more list mode compatibility

This commit is contained in:
Guy Sandler committed 2026-08-30 16:23:44 -07:00
1 parent 6aa50259e4
commit b859108ac8
4 files changed
+142 -36

No files matched your search

+5 -2
View File
@@ -1388,8 +1388,11 @@ function setup() {
// activate revert to original card colors button
document.querySelector("#revert-colors").addEventListener("click", () => {
chrome.storage.local.get("previous_colors", local => {
if (local["previous_colors"] !== null) {
sendFromPopup("setcolors", local["previous_colors"].colors);
const prev = local["previous_colors"];
// Guard against unset/expired-shape entries and the empty lists
// old list-mode runs stored — sending [] would be a silent no-op.
if (prev && Array.isArray(prev.colors) && prev.colors.length > 0) {
sendFromPopup("setcolors", prev.colors);
}
})
})