Skip to content

Commit a2507f6

Browse files
author
medeor413
committed
Fix for AttributeError on icon get
Thanks to @Lknechtli for the fix
1 parent c97e758 commit a2507f6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

starcheat/assets/items.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ def get_item_icon(self, name):
138138
return
139139

140140
icon_file = item[0]["inventoryIcon"]
141-
icon_name = icon_file.split(':')
141+
if not isinstance(icon_file, str):
142+
icon_name = [icon_file[0]['image']]
143+
else:
144+
icon_name = icon_file.split(':')
142145
if len(icon_name) < 2:
143146
icon_name = [icon_name[0], 0]
144147

0 commit comments

Comments
 (0)