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: Created Aug. 12, 2018, 10:28 a.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
@@ -464,17 +464,18 @@
/**
* Generator serializing filter data and yielding it line by line.
*/
*exportData()
{
// Do not persist external subscriptions
let subscriptions = this.subscriptions.filter(
- s => !(s instanceof ExternalSubscription)
+ s => !(s instanceof ExternalSubscription) &&
+ !(s instanceof SpecialSubscription && s.filters.length == 0)
);
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