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

Side by Side Diff: lib/filterStorage.js

Issue 29804571: Noissue - Remove unnecessary references to undefined (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Use null in sparse array Created June 12, 2018, 7:47 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 case "filter": 759 case "filter":
760 case "subscription": 760 case "subscription":
761 this.wantObj = true; 761 this.wantObj = true;
762 this.curObj = {}; 762 this.curObj = {};
763 break; 763 break;
764 case "subscription filters": 764 case "subscription filters":
765 this.wantObj = false; 765 this.wantObj = false;
766 this.curObj = []; 766 this.curObj = [];
767 break; 767 break;
768 default: 768 default:
769 this.wantObj = undefined; 769 this.wantObj = null;
770 this.curObj = null; 770 this.curObj = null;
771 } 771 }
772 } 772 }
773 else if (this.wantObj === false && val) 773 else if (this.wantObj === false && val)
774 this.curObj.push(val.replace(/\\\[/g, "[")); 774 this.curObj.push(val.replace(/\\\[/g, "["));
775 } 775 }
776 finally 776 finally
777 { 777 {
778 Filter.knownFilters = origKnownFilters; 778 Filter.knownFilters = origKnownFilters;
779 Subscription.knownSubscriptions = origKnownSubscriptions; 779 Subscription.knownSubscriptions = origKnownSubscriptions;
780 } 780 }
781 } 781 }
782 }; 782 };
OLDNEW

Powered by Google App Engine
This is Rietveld