From 3055aba05315ca2e4a9f68a23c124c5ed1562890 Mon Sep 17 00:00:00 2001 From: Honza Javorek Date: Tue, 8 Aug 2017 15:15:28 +0200 Subject: [PATCH] refactor: Change to one-liner, possibly more readable --- src/transaction-runner.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/transaction-runner.coffee b/src/transaction-runner.coffee index d28ffaa66..70d3e77a1 100644 --- a/src/transaction-runner.coffee +++ b/src/transaction-runner.coffee @@ -675,8 +675,7 @@ class TransactionRunner isMultipart: (headers) -> contentType = caseless(headers).get('Content-Type') - return false unless contentType - return contentType.indexOf('multipart') > -1 + return if not contentType then false else contentType.indexOf('multipart') > -1 # Finds newlines not preceeded by carriage returns and replaces them by # newlines preceeded by carriage returns.