lib/bearcat/client_module.rb in bearcat-1.5.15 vs lib/bearcat/client_module.rb in bearcat-1.5.16

- old
+ new

@@ -90,11 +90,11 @@ m = Regexp.last_match val = arguments[m[1]] val = val.canvas_id if val.respond_to?(:canvas_id) val = val.id if val.respond_to?(:id) val = val['id'].presence || val[:id].presence || val if val.is_a?(Hash) - val = val.to_s - val = URI.encode_uri_component(val) + val = val.to_s if val.present? + val = URI.encode_uri_component(val) if val.is_a?(String) val end end end end