Skip to content

Commit c95c09f

Browse files
spindaulivz
authored andcommitted
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.
1 parent 6d408ff commit c95c09f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/@vuepress/core/lib/prepare/loadTheme.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ module.exports = async function loadTheme (ctx) {
6262

6363
try {
6464
themeEntryFile = pluginAPI.normalizePlugin(themePath, ctx.themeConfig)
65-
themeEntryFile.name = '@vuepress/internal-theme-entry-file'
66-
themeEntryFile.shortcut = null
6765
} catch (error) {
6866
themeEntryFile = {}
6967
}
68+
themeEntryFile.name = '@vuepress/internal-theme-entry-file'
69+
themeEntryFile.shortcut = null
7070

7171
// handle theme api
7272
const layoutDirs = [

0 commit comments

Comments
 (0)