mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Apply template string transform.
This commit is contained in:
@@ -91,7 +91,7 @@ function truncate(string, options) {
|
||||
substring = result;
|
||||
|
||||
if (!separator.global) {
|
||||
separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
|
||||
separator = RegExp(separator.source, `${ toString(reFlags.exec(separator)) }g`);
|
||||
}
|
||||
separator.lastIndex = 0;
|
||||
while ((match = separator.exec(substring))) {
|
||||
|
||||
Reference in New Issue
Block a user