Skip to content

Commit

Permalink
fix: plugin is not loaded if no keys are provided, fix #14
Browse files Browse the repository at this point in the history
  • Loading branch information
Diederik van den Burger committed Mar 18, 2018
1 parent 849e1e8 commit 3e62730
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/sentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ module.exports = function sentry (moduleOptions) {
}
}, this.options.sentry, moduleOptions)

// Don't proceed if no keys are provided
if (!options.public_key && !options.private_key) {
console.log('nuxt:sentry disabled because no (private) key was found')
return;
}

// Generate DSN
// https://docs.sentry.io/quickstart/#about-the-dsn
if (!options.dsn || !options.dsn.length) {
Expand Down

0 comments on commit 3e62730

Please sign in to comment.