From 2c1944e911c4acf77f16295a73bebb42e558fa3f Mon Sep 17 00:00:00 2001 From: Peter Indiola Date: Thu, 21 Nov 2019 10:06:07 +0800 Subject: [PATCH] Simplify the return expression as this is a boolean --- lib/utils/autocomplete.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/utils/autocomplete.js b/lib/utils/autocomplete.js index da8f3e925..2747fec61 100644 --- a/lib/utils/autocomplete.js +++ b/lib/utils/autocomplete.js @@ -28,10 +28,8 @@ const cacheFileValid = (serverlessConfigFile, validationHash) => { .createHash('sha256') .update(JSON.stringify(serverlessConfigFile)) .digest('hex'); - if (validationHash === serverlessConfigFileHash) { - return true; - } - return false; + + return validationHash === serverlessConfigFileHash; }; const autocomplete = () => {