mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +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) {
|
||||
return defaultValue
|
||||
}
|
||||
if (value !== undefined && other === undefined) {
|
||||
return value
|
||||
}
|
||||
if (other !== undefined && value === undefined) {
|
||||
return other
|
||||
if(value === undefined || other === undefined) {
|
||||
return value || other
|
||||
}
|
||||
if (typeof value === 'string' || typeof other === 'string') {
|
||||
value = baseToString(value)
|
||||
|
||||
Reference in New Issue
Block a user