Skip to content

Commit e825c05

Browse files
ihabadhamclaude
andcommitted
refactor: use .presence idiom in load_license_string
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b5f209a commit e825c05

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

react_on_rails_pro/lib/react_on_rails_pro/license_validator.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,7 @@ def determine_attribution_required
235235
# Loads license string from environment variable
236236
# @return [String, nil] License string or nil if not found
237237
def load_license_string
238-
# License must be configured via environment variable
239-
license = ENV.fetch("REACT_ON_RAILS_PRO_LICENSE", nil)
240-
license = license&.strip
241-
license if license && !license.empty?
238+
ENV.fetch("REACT_ON_RAILS_PRO_LICENSE", nil)&.strip.presence
242239
end
243240

244241
# Decodes and verifies the JWT license

0 commit comments

Comments
 (0)