We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
dirty_hash_to_rule
1 parent 9f7a83c commit 38eacc3Copy full SHA for 38eacc3
lib/recurring_select.rb
@@ -7,14 +7,15 @@ def self.dirty_hash_to_rule(params)
7
if params.is_a? IceCube::Rule
8
params
9
else
10
- if params.is_a?(String)
11
- params = JSON.parse(params)
+ params = JSON.parse(params, quirks_mode: true) if params.is_a?(String)
+ if params.nil?
12
+ nil
13
+ else
14
+ params = params.symbolize_keys
15
+ rules_hash = filter_params(params)
16
+ IceCube::Rule.from_hash(rules_hash)
17
end
18
- params = params.symbolize_keys
- rules_hash = filter_params(params)
-
- IceCube::Rule.from_hash(rules_hash)
19
20
21
0 commit comments