From 4b3e90de8c651bcc593240c40b6695e2d8220429 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 11 Feb 2015 11:49:08 -0500 Subject: [PATCH] do not treat empty line as a rule --- src/js/dyna-rules.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/dyna-rules.js b/src/js/dyna-rules.js index 13e5aae61..c7c84ecba 100644 --- a/src/js/dyna-rules.js +++ b/src/js/dyna-rules.js @@ -71,6 +71,9 @@ var renderRules = function(details) { i = rules.length; while ( i-- ) { rule = rules[i].trim(); + if ( rule === '' ) { + continue; + } sessionRules[rule] = allRules[rule] = true; } details.sessionRules = rules.sort().join('\n'); @@ -79,6 +82,9 @@ var renderRules = function(details) { i = rules.length; while ( i-- ) { rule = rules[i].trim(); + if ( rule === '' ) { + continue; + } permanentRules[rule] = allRules[rule] = true; } details.permanentRules = rules.sort().join('\n');