Skip to content

Commit 479e11d

Browse files
committed
fix(runtime): don't process styles when undefined, fix mediaQuery call
1 parent 8f7c9f9 commit 479e11d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/runtime/process.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export function process (
3131
res[propName] = res[propName].flat(10)
3232
res[propName] = Object.assign({}, ...res[propName])
3333
}
34+
if (typeof res[propName] !== 'object') continue
3435
// force transform to 'px' some units in pure React environment
3536
if (isPureReact()) {
3637
// atm it's only 'lineHeight' property

packages/runtime/vendor/react-native-css-media-query-processor/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function process (obj, matchObject) {
3636
matchObject.type = 'screen'
3737
}
3838

39-
const isMatch = mediaQuery.match(obj.__mediaQueries[key], matchObject)
39+
const isMatch = mediaQuery(obj.__mediaQueries[key], matchObject)
4040
if (isMatch) {
4141
res = merge(res, obj[key])
4242
}

0 commit comments

Comments
 (0)