From 5ba44f7f3f5abeb303edf3bfc37cdf9eca813f94 Mon Sep 17 00:00:00 2001 From: Brent Vatne Date: Tue, 13 Nov 2018 23:31:17 -0800 Subject: [PATCH] Fix regression in StyleSheet.setStyleAttributePreprocessor (#22262) Summary: This regression was caused by 199c918 - property values are initialized to true rather than a string that matches the property name now. Pull Request resolved: https://github.com/facebook/react-native/pull/22262 Differential Revision: D13048839 Pulled By: hramos fbshipit-source-id: 09471334c37f3930aae7e35066943f33f8e617e5 --- Libraries/StyleSheet/StyleSheet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/StyleSheet/StyleSheet.js b/Libraries/StyleSheet/StyleSheet.js index f06337e2867ccc..c6813d2a3c6de3 100644 --- a/Libraries/StyleSheet/StyleSheet.js +++ b/Libraries/StyleSheet/StyleSheet.js @@ -339,7 +339,7 @@ module.exports = { ) { let value; - if (typeof ReactNativeStyleAttributes[property] === 'string') { + if (ReactNativeStyleAttributes[property] === true) { value = {}; } else if (typeof ReactNativeStyleAttributes[property] === 'object') { value = ReactNativeStyleAttributes[property];