rn-css 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -90,7 +90,7 @@ const styled = (Component) => {
90
90
  // apply media queries
91
91
  const mediaQuery = (0, features_1.useMediaQuery)(rnStyle.media, baseUnits);
92
92
  // Handle em units
93
- const fontSize = mediaQuery?.fontSize || tempStyle.fontSize;
93
+ const fontSize = (mediaQuery && mediaQuery.fontSize) || tempStyle.fontSize;
94
94
  const { em } = (0, features_1.useFontSize)(fontSize, baseUnits.rem, parentEm);
95
95
  const finalStyle = react_1.default.useMemo(() => {
96
96
  const style = { ...tempStyle, ...mediaQuery };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rn-css",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "scripts": {
5
5
  "test": "jest",
6
6
  "prepare": "tsc",
@@ -101,7 +101,7 @@ const styled = <Props, >(Component: React.ComponentType<Props>) => {
101
101
  // apply media queries
102
102
  const mediaQuery = useMediaQuery(rnStyle.media, baseUnits)
103
103
  // Handle em units
104
- const fontSize = mediaQuery?.fontSize || tempStyle.fontSize
104
+ const fontSize = (mediaQuery && mediaQuery.fontSize) || tempStyle.fontSize
105
105
  const { em } = useFontSize(fontSize, baseUnits.rem, parentEm)
106
106
 
107
107
  const finalStyle = React.useMemo<Style>(() => {