diff --git a/src/utils/mergeProps/mergeProps.ts b/src/utils/mergeProps/mergeProps.ts index d43ca997..896ad86d 100644 --- a/src/utils/mergeProps/mergeProps.ts +++ b/src/utils/mergeProps/mergeProps.ts @@ -43,13 +43,7 @@ function pushProp(prev: BaseProps, curr: BaseProps): BaseProps { break; } default: { - const mergedFunction = mergeFunction(prev[key], curr[key]); - - if (mergedFunction) { - prev[key] = mergedFunction; - } else if (curr[key] !== undefined) { - prev[key] = curr[key]; - } + prev[key] = mergeFunction(prev[key], curr[key]) ?? curr[key]; } } } @@ -57,7 +51,6 @@ function pushProp(prev: BaseProps, curr: BaseProps): BaseProps { } function mergeStyle(a?: CSSProperties, b?: CSSProperties): CSSProperties | undefined { - if (a == null) return b; return { ...a, ...b }; }