We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c75d246 commit da42318Copy full SHA for da42318
1 file changed
src/hooks/useNotification.tsx
@@ -53,17 +53,15 @@ function mergeConfig<T>(...objList: Partial<T>[]): T {
53
const clone = {} as T;
54
55
objList.forEach((obj) => {
56
- if (!obj) {
57
- return;
58
- }
59
-
60
- Object.keys(obj).forEach((key) => {
61
- const value = obj[key as keyof T];
+ if (obj) {
+ Object.keys(obj).forEach((key) => {
+ const value = obj[key as keyof T];
62
63
- if (value !== undefined) {
64
- clone[key as keyof T] = value;
65
66
- });
+ if (value !== undefined) {
+ clone[key as keyof T] = value;
+ }
+ });
67
});
68
69
return clone;
0 commit comments