From a28a58584d6b93437cfeac0082a0a7851eff3ef2 Mon Sep 17 00:00:00 2001 From: curbengh <43627182+curbengh@users.noreply.github.com> Date: Fri, 13 Dec 2019 01:00:22 +0000 Subject: [PATCH] refactor(post): let to const --- lib/hexo/post.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/hexo/post.js b/lib/hexo/post.js index 964cf56cda..37d3f5f676 100644 --- a/lib/hexo/post.js +++ b/lib/hexo/post.js @@ -135,10 +135,8 @@ class Post { const { tag } = this.context.extend; const scaffold = await this._getScaffold(data.layout); - let frontMatter = prepareFrontMatter({...data}); const yfmSplit = yfm.split(scaffold); - - frontMatter = await tag.render(yfmSplit.data, frontMatter); + const frontMatter = await tag.render(yfmSplit.data, prepareFrontMatter({...data})); const { separator } = yfmSplit; const jsonMode = separator[0] === ';';