Skip to content

Commit

Permalink
fix(ui): client addon serve error
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Apr 18, 2018
1 parent 0c1c245 commit a602b2c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ function serve (req, res) {
const { id, 0: file } = req.params
const addon = findOne(id)
if (addon) {
const basePath = getBasePath(require.resolve(addon.path))
res.sendFile(path.join(basePath, file))
const basePath = getBasePath(require.resolve(addon.path || ''))
basePath && res.sendFile(path.join(basePath, file))
} else {
res.status(404)
res.send(`Addon ${id} not found in loaded addons. Try opening a vue-cli project first?`)
Expand Down

0 comments on commit a602b2c

Please sign in to comment.