mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Crash fix: lookup with empty prefixes.
This commit is contained in:
parent
27364e1fbc
commit
cf72e1db36
2 changed files with 10 additions and 1 deletions
pokedex
|
@ -296,7 +296,11 @@ class PokedexLookup(object):
|
|||
name = name.strip()
|
||||
|
||||
prefixes = prefix_chunk.split(',')
|
||||
user_valid_types = [_.strip() for _ in prefixes]
|
||||
user_valid_types = []
|
||||
for prefix in prefixes:
|
||||
prefix = prefix.strip()
|
||||
if prefix:
|
||||
user_valid_types.append(prefix)
|
||||
|
||||
# Merge the valid types together. Only types that appear in BOTH lists
|
||||
# may be used.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue