From c95c09fbf63b682be2c358e4bcffbd106b94ca68 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 14 Oct 2018 08:53:50 -0700 Subject: [PATCH] fix($core): fix extra anonymous plugin message (#926) In the absence of a theme entry file, an extra anonymous plugin load message would be printed as the themeEntryFile object lacked a name. --- packages/@vuepress/core/lib/prepare/loadTheme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@vuepress/core/lib/prepare/loadTheme.js b/packages/@vuepress/core/lib/prepare/loadTheme.js index 1d9846dd..8db6a6fb 100644 --- a/packages/@vuepress/core/lib/prepare/loadTheme.js +++ b/packages/@vuepress/core/lib/prepare/loadTheme.js @@ -62,11 +62,11 @@ module.exports = async function loadTheme (ctx) { try { themeEntryFile = pluginAPI.normalizePlugin(themePath, ctx.themeConfig) - themeEntryFile.name = '@vuepress/internal-theme-entry-file' - themeEntryFile.shortcut = null } catch (error) { themeEntryFile = {} } + themeEntryFile.name = '@vuepress/internal-theme-entry-file' + themeEntryFile.shortcut = null // handle theme api const layoutDirs = [