Skip to content

Commit

Permalink
fix(ui): hasPlugin crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Jun 20, 2018
1 parent 1482e33 commit 581e4ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@vue/cli-ui/src/graphql-api/api/PluginApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class PluginApi {
if (['vue-router', 'vuex'].includes(id)) {
const folder = cwd.get()
const pkg = folders.readPackage(folder, this.context, true)
return (pkg.dependencies[id] || pkg.devDependencies[id])
return ((pkg.dependencies && pkg.dependencies[id]) || (pkg.devDependencies && pkg.devDependencies[id]))
}
return this.plugins.some(p => matchesPluginId(id, p.id))
}
Expand Down

0 comments on commit 581e4ec

Please sign in to comment.