From c282f06c7641764a90a609c2a40615931acf5c73 Mon Sep 17 00:00:00 2001 From: curben <2809763-curben@users.noreply.gitlab.com> Date: Fri, 30 Aug 2019 07:40:29 +0100 Subject: [PATCH] refactor(addJs & addCss): forEach() --- scripts/addCss.js | 4 ++-- scripts/addJs.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/addCss.js b/scripts/addCss.js index 2a691a7..5f200ac 100644 --- a/scripts/addCss.js +++ b/scripts/addCss.js @@ -21,9 +21,9 @@ hexo.extend.helper.register('addCss', (...args) => { } else { // New syntax let tmpResult = ' { tmpResult += ` ${attribute}="${item[attribute]}"` - } + }) tmpResult += '>\n' result += tmpResult } diff --git a/scripts/addJs.js b/scripts/addJs.js index 62659a9..0851732 100644 --- a/scripts/addJs.js +++ b/scripts/addJs.js @@ -21,10 +21,10 @@ hexo.extend.helper.register('addJs', (...args) => { } else { // New syntax let tmpResult = ' { if (item[attribute] === true) tmpResult += ' ' + attribute else tmpResult += ` ${attribute}="${item[attribute]}"` - } + }) tmpResult += '>\n' result += tmpResult }