Permalink
Browse files

bug fix

  • Loading branch information...
1 parent 11196f3 commit a9a6a8051c0cf85fb158c631bce102c7070883e7 Mac Angell committed Mar 14, 2013
Showing with 6 additions and 2 deletions.
  1. +2 −0 app.js
  2. +4 −2 lib/LastFmAddOn.js
View
2 app.js
@@ -43,10 +43,12 @@ var options = {
},
lastFmApiKey: {
argument: 'key',
+ defaultValue: '',
description: 'The last.fm API key'
},
lastFmSecret: {
argument: 'secret',
+ defaultValue: '',
description: 'The last.fm secret'
}
},
View
@@ -76,8 +76,10 @@ module.exports = function LastFmAddOn(bot) {
}
},
lastFmDetailsChangeHandler = function(oldValue, newValue) {
- if (self.options.lastFmApiKey.value.length > 0 &&
- self.options.lastFmApiKey.value.length > 0) {
+ if (self.options.lastFmApiKey.value &&
+ self.options.lastFmApiKey.value.length > 0 &&
+ self.options.lastFmSecret.value &&
+ self.options.lastFmSecret.value.length > 0) {
lastfm = new LastFmNode({
api_key: self.options.lastFmApiKey.value,
secret: self.options.lastFmSecret.value

0 comments on commit a9a6a80

Please sign in to comment.