Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/filterStorage.js

Issue 29854572: Issue 6857 - Do not serialize empty special subscriptions (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Use temporary Set object in unit test Created Oct. 3, 2018, 3:56 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/filterStorage_readwrite.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterStorage.js
===================================================================
--- a/lib/filterStorage.js
+++ b/lib/filterStorage.js
@@ -442,18 +442,22 @@
* Generator serializing filter data and yielding it line by line.
*/
*exportData()
{
// Do not persist external subscriptions
let subscriptions = [];
for (let subscription of this.subscriptions())
{
- if (!(subscription instanceof ExternalSubscription))
+ if (!(subscription instanceof ExternalSubscription) &&
+ !(subscription instanceof SpecialSubscription &&
+ subscription.filters.length == 0))
+ {
subscriptions.push(subscription);
+ }
}
yield "# Adblock Plus preferences";
yield "version=" + formatVersion;
let saved = new Set();
let buf = [];
« no previous file with comments | « no previous file | test/filterStorage_readwrite.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld