From 4a209e559e727b6ff395ae3f9d327921ff2f03d2 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 15 Oct 2017 13:29:58 -0400 Subject: Fixed index page when there are no Pokémon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/pokeviewer/pokemon_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/pokeviewer/pokemon_controller.rb b/app/controllers/pokeviewer/pokemon_controller.rb index f9f6c15..4b49184 100644 --- a/app/controllers/pokeviewer/pokemon_controller.rb +++ b/app/controllers/pokeviewer/pokemon_controller.rb @@ -21,7 +21,7 @@ module Pokeviewer end end - if pokemon.peek.first == -1 + if pokemon.peek and pokemon.peek.first == -1 @unaccounted = pokemon.next.second else @unaccounted = [] -- cgit 1.4.1