Skip to content

Commit 7a01cd0

Browse files
author
Guillaume Chau
committed
fix(ui): client addons serve
1 parent 6af029e commit 7a01cd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/@vue/cli-ui/src/graphql-api/connectors/client-addons.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ function getBasePath (filePath) {
4848
function serve (req, res) {
4949
const { id, 0: file } = req.params
5050
const addon = findOne(id)
51-
if (addon) {
52-
const basePath = getBasePath(require.resolve(addon.path || ''))
51+
if (addon && addon.path) {
52+
const basePath = getBasePath(require.resolve(addon.path))
5353
if (basePath) {
5454
res.sendFile(path.join(basePath, file))
5555
return

0 commit comments

Comments
 (0)