Use early continue style

This commit is contained in:
Eduard Urbach 2018-07-06 01:55:04 +09:00
parent c11745306b
commit 5099663c37

View File

@ -41,12 +41,14 @@ export function toggleHideAddedAnime(arn: AnimeNotifier, input: HTMLButtonElemen
// Hides anime that are already in your list. // Hides anime that are already in your list.
export function hideAddedAnime() { export function hideAddedAnime() {
for(let anime of findAll("anime-grid-cell")) { for(let anime of findAll("anime-grid-cell")) {
if(anime.dataset.added === "true") { if(anime.dataset.added !== "true") {
if(localStorage.getItem("hide-added-anime") === "true") { continue
anime.classList.add("anime-grid-cell-hide") }
} else {
anime.classList.remove("anime-grid-cell-hide") if(localStorage.getItem("hide-added-anime") === "true") {
} anime.classList.add("anime-grid-cell-hide")
} else {
anime.classList.remove("anime-grid-cell-hide")
} }
} }
} }