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

Unified 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.
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 | lib/filterStorage.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/content/elemHideEmulation.js
===================================================================
--- a/lib/content/elemHideEmulation.js
+++ b/lib/content/elemHideEmulation.js
@@ -182,17 +182,17 @@
* Make a regular expression from a text argument. If it can be parsed as a
* regular expression, parse it and the flags.
* @param {string} text the text argument.
* @return {?RegExp} a RegExp object or null in case of error.
*/
function makeRegExpParameter(text)
{
let [, pattern, flags] =
- regexpRegexp.exec(text) || [undefined, textToRegExp(text)];
Manish Jethani 2018/06/12 07:47:51 This also doesn't have to be undefined, it should
+ regexpRegexp.exec(text) || [null, textToRegExp(text)];
try
{
return new RegExp(pattern, flags);
}
catch (e)
{
}
« 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