Skip to content
This repository was archived by the owner on May 1, 2021. It is now read-only.

Commit 61c851a

Browse files
committed
Fixes #25 - add all param properties to exclude, only override decode
1 parent aee53ab commit 61c851a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/withDefault.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ export function withDefault<D, DefaultType extends D2, D2 = D>(
3939

4040
return decodedValue as Exclude<D2, undefined | null>;
4141
};
42-
return { encode: param.encode, decode: decodeWithDefault };
42+
return { ...param, decode: decodeWithDefault };
4343
}
4444
export default withDefault;

0 commit comments

Comments
 (0)