From b7167f289a9c8396372bce723302e90c4edb07aa Mon Sep 17 00:00:00 2001 From: curben Date: Wed, 10 Jul 2019 21:17:17 +0930 Subject: [PATCH] refactor: use OR operator --- themes/typing/scripts/cloudinary.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/themes/typing/scripts/cloudinary.js b/themes/typing/scripts/cloudinary.js index b4672f5..d4c50ea 100644 --- a/themes/typing/scripts/cloudinary.js +++ b/themes/typing/scripts/cloudinary.js @@ -10,11 +10,7 @@ */ hexo.extend.tag.register('cloudinary', (args) => { const fileName = args[0] - let alt = '' - - if (args[1]) { - alt = args[1] - } + const alt = args[1] || '' return '' + alt + '' })