Update lib/oauth2_basic_authenticator.rb

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
This commit is contained in:
Natalie Tay 2024-03-21 17:34:36 +08:00 committed by GitHub
parent 2403b33ee3
commit 93fb16e408
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ class OAuth2BasicAuthenticator < Auth::ManagedAuthenticator
segments = parse_segments(path)
val = walk_path(user_json, segments)
# [] should be nil, false should be false
result[prop] = val.blank? ? (val == [] ? nil : val) : val
result[prop] = val.presence || (val == [] ? nil : val)
end
end