From 133baf5570d2f739e07f62da1506dc08b028506d Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 9 Oct 2018 12:29:38 -0700 Subject: [PATCH] fix($core): fix extra anonymous plugin message 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 1d9846dd1b..8db6a6fb5d 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 = [