diff --git a/.rubocop.yml b/.rubocop.yml index 0747bb2e7..2fa6f89b3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -311,6 +311,9 @@ Lint/NonAtomicFileOperation: Lint/ParenthesesAsGroupedExpression: Enabled: true +Lint/RedundantSafeNavigation: + Enabled: true + Lint/RedundantStringCoercion: Enabled: true diff --git a/app/controllers/legislation/annotations_controller.rb b/app/controllers/legislation/annotations_controller.rb index ccc577320..f7289d9ff 100644 --- a/app/controllers/legislation/annotations_controller.rb +++ b/app/controllers/legislation/annotations_controller.rb @@ -101,7 +101,7 @@ class Legislation::AnnotationsController < Legislation::BaseController def convert_ranges_parameters annotation = params[:legislation_annotation] - if annotation && annotation[:ranges]&.is_a?(String) + if annotation && annotation[:ranges].is_a?(String) params[:legislation_annotation][:ranges] = JSON.parse(annotation[:ranges]) end rescue JSON::ParserError