mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
chore: combine the if statements into one (#5785)
This commit is contained in:
@@ -14,11 +14,8 @@ function createMathOperation(operator, defaultValue) {
|
|||||||
if (value === undefined && other === undefined) {
|
if (value === undefined && other === undefined) {
|
||||||
return defaultValue
|
return defaultValue
|
||||||
}
|
}
|
||||||
if (value !== undefined && other === undefined) {
|
if(value === undefined || other === undefined) {
|
||||||
return value
|
return value || other
|
||||||
}
|
|
||||||
if (other !== undefined && value === undefined) {
|
|
||||||
return other
|
|
||||||
}
|
}
|
||||||
if (typeof value === 'string' || typeof other === 'string') {
|
if (typeof value === 'string' || typeof other === 'string') {
|
||||||
value = baseToString(value)
|
value = baseToString(value)
|
||||||
|
|||||||
Reference in New Issue
Block a user