Skip to content

Commit

Permalink
fix(array): fix array validation and cast
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelipemartins committed Sep 27, 2023
1 parent 22f2558 commit 4da5dca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion addons/pandora/ui/components/array_editor/array_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func close():

func is_empty(item: Variant):
var array_type = _property.get_setting(ArrayType.SETTING_ARRAY_TYPE)
if array_type == 'reference' or array_type == 'resource':
if array_type == 'resource':
return is_instance_valid(item) == false
elif array_type == 'string':
return item == ""
Expand Down Expand Up @@ -67,6 +67,9 @@ func _load_items():
var value = _items[i]
if array_type == 'resource':
value = load(value)
elif array_type == 'reference':
if value is Dictionary:
value = Pandora.get_entity(value["_entity_id"])
item_property.set_default_value(value)
_add_property_control(control, item_property, i)

Expand Down

0 comments on commit 4da5dca

Please sign in to comment.