From a491ac50a1e3a1f109eb7d6620cfb103c3e8e1ff Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Fri, 6 Jul 2018 01:37:43 +0900 Subject: [PATCH] Use early return style --- scripts/AnimeNotifier.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/AnimeNotifier.ts b/scripts/AnimeNotifier.ts index 4b3563ef..d3e217e3 100644 --- a/scripts/AnimeNotifier.ts +++ b/scripts/AnimeNotifier.ts @@ -474,15 +474,17 @@ export default class AnimeNotifier { } } - // Hides user anime automatically if localStorage.hide is true + // Hides anime already existing in the user's anime list automatically hideAddedAnime() { if(!this.app.currentPath.includes("/explore") && !this.app.currentPath.includes("/genre")) { return } - if(localStorage.getItem("hide-added-anime") === "true") { - actions.hideAddedAnime() + if(localStorage.getItem("hide-added-anime") !== "true") { + return } + + actions.hideAddedAnime() } markPlayingSoundTrack() {