fix: runtime-styles parsing for RWN <=0.17

This commit is contained in:
Mark Lawlor
2022-05-26 10:43:12 +10:00
parent f9f8db2f33
commit 6dc195811a

View File

@@ -49,7 +49,8 @@ export function getRuntimeStyles<P>({
}
for (let styleRecord of styleArray) {
if ("atRules" in styleRecord) {
// react-native-web <=17 still uses style IDs, so styleRecord may be a number
if (typeof styleRecord === "object" && "atRules" in styleRecord) {
let isForChildren = false;
const { atRules, ...style } = styleRecord;