Skip to content

Commit 48d2852

Browse files
committed
merge early return conditions
1 parent 7a5c5a2 commit 48d2852

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/utils.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,7 @@ function isMergeableObject<TObject extends Record<string, unknown>>(value: unkno
172172

173173
/** Deep removes the nested null values from the given value. */
174174
function removeNestedNullValues<TValue extends OnyxInput<OnyxKey> | null>(value: TValue): TValue {
175-
if (value === null || value === undefined) {
176-
return value;
177-
}
178-
179-
if (typeof value !== 'object') {
175+
if (value === null || value === undefined || typeof value !== 'object') {
180176
return value;
181177
}
182178

0 commit comments

Comments
 (0)