Ensure _.escapeRegExp handles empty strings in a way to work with compilation.

This commit is contained in:
jdalton
2015-06-19 10:53:02 -07:00
parent 4bcb99a6b9
commit 4896c725b6

View File

@@ -10492,7 +10492,7 @@
string = baseToString(string);
return (string && reHasRegExpChars.test(string))
? string.replace(reRegExpChars, '\\$&')
: string;
: (string || '(?:)');
}
/**