Use early return style

This commit is contained in:
Eduard Urbach 2018-07-06 01:37:43 +09:00
parent 9c67a51fb4
commit a491ac50a1

View File

@ -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() { hideAddedAnime() {
if(!this.app.currentPath.includes("/explore") && !this.app.currentPath.includes("/genre")) { if(!this.app.currentPath.includes("/explore") && !this.app.currentPath.includes("/genre")) {
return return
} }
if(localStorage.getItem("hide-added-anime") === "true") { if(localStorage.getItem("hide-added-anime") !== "true") {
actions.hideAddedAnime() return
} }
actions.hideAddedAnime()
} }
markPlayingSoundTrack() { markPlayingSoundTrack() {