mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Move _.repeat empty string check to the left.
This commit is contained in:
@@ -10590,7 +10590,7 @@
|
|||||||
var result = '';
|
var result = '';
|
||||||
string = baseToString(string);
|
string = baseToString(string);
|
||||||
n = toInteger(n);
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
// Leverage the exponentiation by squaring algorithm for a faster repeat.
|
// Leverage the exponentiation by squaring algorithm for a faster repeat.
|
||||||
|
|||||||
Reference in New Issue
Block a user