Skip to content

Commit

Permalink
ensure item data isnt null
Browse files Browse the repository at this point in the history
  • Loading branch information
m4ym4y committed Feb 27, 2025
1 parent 3e7618d commit 87f457a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scenes/Museum.gd
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,10 @@ func _on_fetch_complete(_titles, context):
var image_titles = []
var item_queue = []
for item_data in items:
if item_data.type == "image" and item_data.has("title") and item_data.title != "":
image_titles.append(item_data.title)
item_queue.append(_add_item.bind(new_exhibit, item_data))
if item_data:
if item_data.type == "image" and item_data.has("title") and item_data.title != "":
image_titles.append(item_data.title)
item_queue.append(_add_item.bind(new_exhibit, item_data))

if result.has("wikidata_entity"):
_queue_item_front(context.title, ExhibitFetcher.fetch_wikidata.bind(result.wikidata_entity, {
Expand Down

0 comments on commit 87f457a

Please sign in to comment.