Skip to content

Commit

Permalink
Avoid params mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
veelenga committed Apr 11, 2018
1 parent 975d902 commit 22b3e2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/query_helper.cr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Helpers::QueryHelper
def to_query(**query)
current_params = params.to_h
current_params = params.to_h.dup
query.each { |k, v| current_params[k.to_s] = v.to_s }
HTTP::Params.encode current_params
end
Expand Down

0 comments on commit 22b3e2d

Please sign in to comment.