Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit 0755557

Browse files
authored
Merge pull request #74 from nabilfreeman/patch-1
fix: useStylesheet to deep copy the style object to be merged so original objects don't leak into each other
2 parents 1f7a377 + ff930b1 commit 0755557

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useStylesheet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const getStylesheet = <T extends Record<string, unknown>>(
1717
const selectedStyles: NamedStyles<T>[] = [];
1818
styles.forEach((style) =>
1919
mediaQuery(style.query, width, height)
20-
? selectedStyles.push(style.style)
20+
? selectedStyles.push(_.cloneDeep(style.style))
2121
: undefined
2222
);
2323
return _.merge.apply<null, NamedStyles<T>[], NamedStyles<T>>(

0 commit comments

Comments
 (0)