Skip to content

Commit

Permalink
feat(iconsPath): disable icons list page if path does not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Feb 8, 2020
1 parent 098f9a1 commit c4cc120
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default async function module (moduleOptions) {
options
})

if (this.nuxt.options.dev) {
if (this.nuxt.options.dev && options.iconsPath) {
const componentPath = path.resolve(this.nuxt.options.buildDir, 'nuxt-svg-sprite-icons-list.vue')

this.addTemplate({
Expand All @@ -53,7 +53,7 @@ export default async function module (moduleOptions) {
options
})
// register page
this.extendRoutes(function(routes) {
this.extendRoutes(function svgModuleExtendRoutes (routes) {
routes.push({
name: 'icons-list',
path: options.iconsPath,
Expand Down

0 comments on commit c4cc120

Please sign in to comment.