Skip to content

Commit 5b3e5ff

Browse files
justin808claude
andcommitted
Simplify supports_auto_registration? method
- Remove unnecessary min_version variable assignment - Remove overly broad StandardError rescue clause - Use direct constant reference in method call - Cleaner, more readable implementation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 70b4c7d commit 5b3e5ff

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/react_on_rails/packer_utils.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ def self.supports_basic_pack_generation?
4949
end
5050

5151
def self.supports_auto_registration?
52-
min_version = ReactOnRails::PacksGenerator::MINIMUM_SHAKAPACKER_VERSION_FOR_AUTO_REGISTRATION
53-
packer.config.respond_to?(:nested_entries?) && shakapacker_version_requirement_met?(min_version)
54-
rescue StandardError
55-
false
52+
packer.config.respond_to?(:nested_entries?) &&
53+
shakapacker_version_requirement_met?(ReactOnRails::PacksGenerator::MINIMUM_SHAKAPACKER_VERSION_FOR_AUTO_REGISTRATION)
5654
end
5755

5856
# This returns either a URL for the webpack-dev-server, non-server bundle or

0 commit comments

Comments
 (0)