Skip to content

Commit 2d6c583

Browse files
committed
Fix original defaultProp object getting mutated
1 parent 41ac730 commit 2d6c583

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ReactSpreadsheetImport.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const defaultRSIProps: Partial<RsiProps<any>> = {
2424
} as const
2525

2626
export const ReactSpreadsheetImport = <T extends string>(propsWithoutDefaults: RsiProps<T>) => {
27-
const props = merge(defaultRSIProps, propsWithoutDefaults)
27+
const props = merge({}, defaultRSIProps, propsWithoutDefaults)
2828
const mergedTranslations =
2929
props.translations !== translations ? merge(translations, props.translations) : translations
3030
const mergedThemes = props.rtl

0 commit comments

Comments
 (0)