Skip to content

Commit

Permalink
fix(ui): client addons serve
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Apr 18, 2018
1 parent 6af029e commit 7a01cd0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ function getBasePath (filePath) {
function serve (req, res) {
const { id, 0: file } = req.params
const addon = findOne(id)
if (addon) {
const basePath = getBasePath(require.resolve(addon.path || ''))
if (addon && addon.path) {
const basePath = getBasePath(require.resolve(addon.path))
if (basePath) {
res.sendFile(path.join(basePath, file))
return
Expand Down

0 comments on commit 7a01cd0

Please sign in to comment.