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

Side by Side Diff: lib/content/elemHideEmulation.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
« no previous file with comments | « no previous file | lib/filterStorage.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 /** 181 /**
182 * Make a regular expression from a text argument. If it can be parsed as a 182 * Make a regular expression from a text argument. If it can be parsed as a
183 * regular expression, parse it and the flags. 183 * regular expression, parse it and the flags.
184 * @param {string} text the text argument. 184 * @param {string} text the text argument.
185 * @return {?RegExp} a RegExp object or null in case of error. 185 * @return {?RegExp} a RegExp object or null in case of error.
186 */ 186 */
187 function makeRegExpParameter(text) 187 function makeRegExpParameter(text)
188 { 188 {
189 let [, pattern, flags] = 189 let [, pattern, flags] =
190 regexpRegexp.exec(text) || [undefined, textToRegExp(text)]; 190 regexpRegexp.exec(text) || [null, textToRegExp(text)];
Manish Jethani 2018/06/12 07:47:51 This also doesn't have to be undefined, it should
191 191
192 try 192 try
193 { 193 {
194 return new RegExp(pattern, flags); 194 return new RegExp(pattern, flags);
195 } 195 }
196 catch (e) 196 catch (e)
197 { 197 {
198 } 198 }
199 return null; 199 return null;
200 } 200 }
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 characterData: shouldObserveCharacterData(this.patterns), 865 characterData: shouldObserveCharacterData(this.patterns),
866 subtree: true 866 subtree: true
867 } 867 }
868 ); 868 );
869 this.document.addEventListener("load", this.onLoad.bind(this), true); 869 this.document.addEventListener("load", this.onLoad.bind(this), true);
870 } 870 }
871 } 871 }
872 }; 872 };
873 873
874 exports.ElemHideEmulation = ElemHideEmulation; 874 exports.ElemHideEmulation = ElemHideEmulation;
OLDNEW
« no previous file with comments | « no previous file | lib/filterStorage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld