Skip to content

Commit

Permalink
fix(lib): check listeners value before
Browse files Browse the repository at this point in the history
Fixes #216
  • Loading branch information
Atinux committed Dec 4, 2020
1 parent df9970f commit 431eafc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ module.exports = async function (moduleOptions) {
component: page
})
})
const url = nuxt.server.listeners ? nuxt.server.listeners[0].url : '/'
const url = nuxt.server.listeners && nuxt.server.listeners[0] ? nuxt.server.listeners[0].url : '/'
logger.info(`Tailwind Colors available on ${url}_tailwind`)
}
/*
Expand Down

1 comment on commit 431eafc

@kreig303
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very clever!

Please sign in to comment.