Skip to content

Commit

Permalink
Fix client data to be optional in ControlWithItems.set
Browse files Browse the repository at this point in the history
  • Loading branch information
jminer13 committed Aug 11, 2023
1 parent 87c390a commit 2c53ef0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/wx/core/controlwithitems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ def get_client_data(item)
end
wx_set.bind(self).call(items)
client_data_store.clear
items.each_with_index { |item, ix| set_client_data(item, data[ix]) }
if data
items.each_with_index { |item, ix| set_client_data(item, data[ix]) }
end
end

wx_clear = instance_method :clear
Expand Down

0 comments on commit 2c53ef0

Please sign in to comment.