]> source.dussan.org Git - redmine.git/commitdiff
Fix RuboCop offense Style/RedundantCondition in lib/redmine/menu_manager.rb (#36919).
authorGo MAEDA <maeda@farend.jp>
Tue, 14 Jun 2022 02:36:58 +0000 (02:36 +0000)
committerGo MAEDA <maeda@farend.jp>
Tue, 14 Jun 2022 02:36:58 +0000 (02:36 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@21630 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/menu_manager.rb

index 0ff2bfd71a0cc3f83e1a0d8dea249c037260afa8..6b5ca6e8e68af00619c111ebbe054489933c900a 100644 (file)
@@ -286,11 +286,7 @@ module Redmine
 
         if options[:parent]
           subtree = self.find(options[:parent])
-          if subtree
-            target_root = subtree
-          else
-            target_root = @menu_items.root
-          end
+          target_root = subtree || @menu_items.root
 
         else
           target_root = @menu_items.root