From 452a340fff0d0bcf3ec70e8a688b5534e098959a Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Mon, 11 Mar 2019 09:20:12 +0900 Subject: [PATCH] Check relevant character before accessing it --- pages/character/character.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/character/character.go b/pages/character/character.go index 6dfccff8..89ea6689 100644 --- a/pages/character/character.go +++ b/pages/character/character.go @@ -58,12 +58,12 @@ func Get(ctx *aero.Context) string { for characterID := range characterAppearances { relevantCharacter, err := arn.GetCharacter(characterID) - if !relevantCharacter.HasImage() { + if err != nil { + color.Red(err.Error()) continue } - if err != nil { - color.Red(err.Error()) + if !relevantCharacter.HasImage() { continue }