Update table_pages.gd

Basic handling of empty directory - just return without populating table.
This commit is contained in:
darloth 2023-03-19 17:11:25 +00:00 committed by GitHub
parent a181f3a060
commit cc47e7ef73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,6 +39,8 @@ func _on_grid_updated():
var sort_type = node_editor_view_root.column_types[node_editor_view_root.columns.find(sort_property)]
var property_values = []
property_values.resize(page_count)
if(node_editor_view_root.rows.size() == 0):
return
for i in page_count:
property_values[i] = node_editor_view_root.rows[i * rows_per_page].get(sort_property)