From 4896c725b63ce8e955d6a5e042fc414456dad2ea Mon Sep 17 00:00:00 2001 From: jdalton Date: Fri, 19 Jun 2015 10:53:02 -0700 Subject: [PATCH] Ensure `_.escapeRegExp` handles empty strings in a way to work with compilation. --- lodash.src.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodash.src.js b/lodash.src.js index 2634141b5..e7d242ef7 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -10492,7 +10492,7 @@ string = baseToString(string); return (string && reHasRegExpChars.test(string)) ? string.replace(reRegExpChars, '\\$&') - : string; + : (string || '(?:)'); } /**