Skip to content

Commit

Permalink
Avoid possible bugs with truthiness checks for Bool attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
akadusei committed Oct 27, 2023
1 parent ae14732 commit f375cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/shield/operations/mixins/send_welcome_email_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ private class SaveUser < User::SaveOperation
include Shield::SendWelcomeEmail

private def validate_email_unique
return unless email.value
return if email.value.nil?
email.add_error("exists") if user_email?
end
end
Expand Down

0 comments on commit f375cc5

Please sign in to comment.