lib/checkoff/internal/task_hashes.rb in checkoff-0.196.0 vs lib/checkoff/internal/task_hashes.rb in checkoff-0.197.0

- old
+ new

@@ -31,10 +31,16 @@ private # @param task_hash [Hash] # @return [void] def unwrap_custom_fields(task_hash) - unwrapped_custom_fields = task_hash.fetch('custom_fields', []).group_by do |cf| + # @sg-ignore + # @type [Array<Hash>,nil] + custom_fields = task_hash.fetch('custom_fields', nil) + + return if custom_fields.nil? + + unwrapped_custom_fields = custom_fields.group_by do |cf| cf['name'] end.transform_values(&:first) task_hash['unwrapped']['custom_fields'] = unwrapped_custom_fields end