From 4b405dc0525ae4ce9ffa082d7ee69258010ec17e Mon Sep 17 00:00:00 2001 From: Jordan Brough Date: Tue, 5 Jul 2022 09:12:53 -0600 Subject: [PATCH] chore: Remove no-op condition in Api::V1::InboxesHelper (#4966) - `smtp` cannot be nil in this context - `anything&.nil?` will never be truthy, even if `anything` is nil --- app/helpers/api/v1/inboxes_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/api/v1/inboxes_helper.rb b/app/helpers/api/v1/inboxes_helper.rb index aa28e4ccc..c88f2fb73 100644 --- a/app/helpers/api/v1/inboxes_helper.rb +++ b/app/helpers/api/v1/inboxes_helper.rb @@ -59,7 +59,7 @@ module Api::V1::InboxesHelper def check_smtp_connection(channel_data, smtp) smtp.start(channel_data[:smtp_domain], channel_data[:smtp_login], channel_data[:smtp_password], channel_data[:smtp_authentication]&.to_sym || :login) - smtp.finish unless smtp&.nil? + smtp.finish end def set_smtp_encryption(channel_data, smtp)