From 8711bfc09713cf5f932a17991b2d2173b209438e Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 12 Mar 2015 07:33:20 -0400 Subject: [PATCH] code review --- src/js/3p-filters.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/js/3p-filters.js b/src/js/3p-filters.js index 6675915d5..79a9e9068 100644 --- a/src/js/3p-filters.js +++ b/src/js/3p-filters.js @@ -365,17 +365,13 @@ var selectFilterLists = function(callback) { // Filter lists var switches = []; - var lis = uDom('#lists .listEntry'); + var lis = uDom('#lists .listEntry'), li; var i = lis.length; - var path; while ( i-- ) { - path = lis - .subset(i, 1) - .descendants('a') - .attr('href'); + li = lis.at(i); switches.push({ - location: path, - off: lis.subset(i, 1).descendants('input').prop('checked') === false + location: li.descendants('a').attr('href'), + off: li.descendants('input').prop('checked') === false }); }