Skip to content

Commit

Permalink
Only check range if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
jmthomas committed Apr 4, 2017
1 parent 360ffaa commit 3d95b25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cosmos/tools/table_manager/table_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ def save_gui_data(name)
else
table.write(item.name, value)
end
raise "out of range" unless item.range.include?(table.read(item.name, :RAW))
raise "out of range" if item.range && !item.range.include?(table.read(item.name, :RAW))

# if we have a problem casting the value it probably means the user put in garbage
# in this case force the range check to fail
Expand Down

0 comments on commit 3d95b25

Please sign in to comment.