[Pkg-mozext-commits] [adblock-plus] 05/87: Noissue - Ignore empty lines when saving custom filters in test environment
David Prévot
taffit at moszumanska.debian.org
Sat Apr 30 17:59:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit 3525aedf4bd4ce9b479b37e82535b994461556d2
Author: Thomas Greiner <thomas at adblockplus.org>
Date: Thu Dec 17 18:29:20 2015 +0100
Noissue - Ignore empty lines when saving custom filters in test environment
Review: https://codereview.adblockplus.org/29329095/
---
background.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/background.js b/background.js
index f71b877..689f7d6 100644
--- a/background.js
+++ b/background.js
@@ -175,7 +175,9 @@
if (params.filterError)
return {errors: ["Invalid filter"]};
return {
- filters: text.split("\n").map(modules.filterClasses.Filter.fromText),
+ filters: text.split("\n")
+ .filter(function(filter) {return !!filter;})
+ .map(modules.filterClasses.Filter.fromText),
errors: []
};
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list