@samitouri / QOS-React-2 / commits / fdc6beed1a
Fork 0

The library for web and native user interfaces.

Fix nit and comment

Ben Alpert committed Jun 11, 2013 at 19:53 UTC fdc6beed1a3aab063752a395a42432251b3443fe
2 files changed +7 -10
src/core/ReactNativeComponent.js
+5 -7
@@ -253,14 +253,12 @@ ReactNativeComponent.Mixin = {
253 if (nextProp) {
254 nextProp = nextProps.style = merge(nextProp);
255 }
256 - if (lastProp) {
257 - for (styleName in lastProp) {
258 - if (lastProp.hasOwnProperty(styleName) && !nextProp[styleName]) {
259 - if (!styleUpdates) {
260 - styleUpdates = {};
261 - }
262 - styleUpdates[styleName] = '';
256 + for (styleName in lastProp) {
257 + if (lastProp.hasOwnProperty(styleName) && !nextProp[styleName]) {
258 + if (!styleUpdates) {
259 + styleUpdates = {};
260 }
261 + styleUpdates[styleName] = '';
262 }
263 }
264 for (styleName in nextProp) {
src/dom/DOMProperty.js
+2 -3
@@ -107,9 +107,8 @@ var DOMProperty = {
107 * attribute). Most default values are '' or false, but not all. Worse yet,
108 * some (in particular, `type`) vary depending on the type of element.
109 *
110 - * TODO: Is it worth caching the test elements? Caching the properties
111 - * ourselves (as opposed to accessing from a cached test element every time)
112 - * looks probably worth it: http://jsperf.com/object-vs-element
110 + * TODO: Is it better to grab all the possible properties when creating an
111 + * element to avoid having to create the same element twice?
112 */
113 getDefaultValueForProperty: function(nodeName, prop) {
114 var nodeDefaults = defaultValueCache[nodeName];