diff options
author | gorhill <rhill@raymondhill.net> | 2015-08-25 15:43:32 -0400 |
---|---|---|
committer | gorhill <rhill@raymondhill.net> | 2015-08-25 15:43:32 -0400 |
commit | b685af177e0de3dc11ebb03c89bdd2340b559f44 (patch) | |
tree | dbb99f7b9c6ad063557412f7ab59516079d6ade5 /src/js | |
parent | 57a7f6bcd7f9038047a25a157a7470e34ef38d11 (diff) | |
download | uBlock-b685af177e0de3dc11ebb03c89bdd2340b559f44.zip uBlock-b685af177e0de3dc11ebb03c89bdd2340b559f44.tar.gz uBlock-b685af177e0de3dc11ebb03c89bdd2340b559f44.tar.bz2 |
code review
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/assets.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/js/assets.js b/src/js/assets.js index 6b53128..8549cd8 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -441,12 +441,9 @@ var getRepoMetadata = function(callback) { var line, matches; for ( var i = 0; i < lines.length; i++ ) { line = lines[i]; - matches = line.match(/^([0-9a-f]+) (.+)$/); - if ( matches === null ) { - continue; - } - if ( listMap.hasOwnProperty(matches[2]) ) { - continue; + matches = line.match(/^[0-9a-f]+ (.+)$/); + if ( matches === null || listMap.hasOwnProperty(matches[1]) ) { + continue; } out.push(line); } |