From c1760e54335d13fa85fff373ae36009bbe5c5af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Mon, 17 Feb 2014 12:37:14 +0000 Subject: [PATCH] Fix JS coding style TODO: rebase this as a fixup. I don't think the github web interface supports that. --- js/glowingbear.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/glowingbear.js b/js/glowingbear.js index 7b00eb6..22fe4d8 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -733,15 +733,16 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', $rootScope.switchToActivityBuffer = function() { // Find next buffer with activity and switch to it var sortedBuffers = _.sortBy($scope.buffers, 'number'); - for (var i in sortedBuffers) { - var buffer = sortedBuffers[i]; + var i, buffer; + for (i in sortedBuffers) { + buffer = sortedBuffers[i]; if (buffer.notification > 0) { $scope.setActiveBuffer(buffer.id); break; } } - for (var i in sortedBuffers) { - var buffer = sortedBuffers[i]; + for (i in sortedBuffers) { + buffer = sortedBuffers[i]; if(buffer.unread > 0) { $scope.setActiveBuffer(buffer.id); break;