Oops, don't crash when an item has no previews
A weird state to get into, one would expect impossible! But something funny is going on with the Kiko Lake Team Popcorn item (85598)!
This commit is contained in:
parent
e7148ffae3
commit
a08fb89d59
1 changed files with 2 additions and 1 deletions
|
@ -215,7 +215,8 @@ class ItemsController < ApplicationController
|
|||
@item.compatible_pet_types.
|
||||
preferring_species(cookies["preferred-preview-species-id"] || "<ignore>").
|
||||
preferring_color(cookies["preferred-preview-color-id"] || "<ignore>").
|
||||
preferring_simple.first
|
||||
preferring_simple.first ||
|
||||
PetType.matching_name("Blue", "Acara").first!
|
||||
end
|
||||
|
||||
def validate_preview
|
||||
|
|
Loading…
Reference in a new issue