From 6897c001ca5c0f0dfb8d57d962216eecd4bcc371 Mon Sep 17 00:00:00 2001 From: Matteo Manzinello Date: Mon, 28 Oct 2019 11:17:33 +0100 Subject: [PATCH] shorthand if --- src/mailgo.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mailgo.js b/src/mailgo.js index c7c0ca5..c8c7314 100644 --- a/src/mailgo.js +++ b/src/mailgo.js @@ -787,12 +787,11 @@ // is the mailgo modal hidden? const mailgoIsShowing = (type = MAIL_TYPE) => { - if (type === MAIL_TYPE) { - return getDisplay("mailgo") === "flex"; - } else if (type === TEL_TYPE) { - return getDisplay("mailgo-tel") === "flex"; - } - return false; + return type === MAIL_TYPE + ? getDisplay("mailgo") === "flex" + : type === TEL_TYPE + ? getDisplay("mailgo-tel") === "flex" + : false; }; // window exists