mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Move _.repeat empty string check to the left.
This commit is contained in:
@@ -10590,7 +10590,7 @@
|
||||
var result = '';
|
||||
string = baseToString(string);
|
||||
n = toInteger(n);
|
||||
if (n < 1 || n == POSITIVE_INFINITY || n == NEGATIVE_INFINITY || !string) {
|
||||
if (!string || n < 1 || n == POSITIVE_INFINITY || n == NEGATIVE_INFINITY) {
|
||||
return result;
|
||||
}
|
||||
// Leverage the exponentiation by squaring algorithm for a faster repeat.
|
||||
|
||||
Reference in New Issue
Block a user