diff --git a/js/irc-utils.js b/js/irc-utils.js index 6bd3c31..8bdfe23 100644 --- a/js/irc-utils.js +++ b/js/irc-utils.js @@ -122,6 +122,7 @@ var IrcUtils = { // iterating nicks at the beginning? var m = beforeCaret.match(new RegExp('^([a-zA-Z0-9_\\\\\\[\\]{}^`|-]+)' + suf + ' $')); + var newNick = null; if (m) { if (doIterate) { diff --git a/js/models.js b/js/models.js index b8fb1df..70d3618 100644 --- a/js/models.js +++ b/js/models.js @@ -80,7 +80,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) */ var updateNick = function(group, nick) { group = nicklist[group]; - for(i in group.nicks) { + for(var i in group.nicks) { if(group.nicks[i].name == nick.name) { group.nicks[i] = nick; break; diff --git a/js/plugins.js b/js/plugins.js index e4e3a77..849d547 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -123,7 +123,7 @@ plugins.factory('userPlugins', function() { var spotifyPlugin = new Plugin(function(message) { var addMatch = function(match) { var ret = ''; - for(i in match) { + for(var i in match) { var id = match[i].substr(match[i].length-22, match[i].length); ret += ''; }