Fix nit and comment

This commit is contained in:
Ben Alpert
2013-06-11 19:53:24 -07:00
parent 731aa8ead1
commit fdc6beed1a
2 changed files with 7 additions and 10 deletions
+5 -7
View File
@@ -253,14 +253,12 @@ ReactNativeComponent.Mixin = {
if (nextProp) {
nextProp = nextProps.style = merge(nextProp);
}
if (lastProp) {
for (styleName in lastProp) {
if (lastProp.hasOwnProperty(styleName) && !nextProp[styleName]) {
if (!styleUpdates) {
styleUpdates = {};
}
styleUpdates[styleName] = '';
for (styleName in lastProp) {
if (lastProp.hasOwnProperty(styleName) && !nextProp[styleName]) {
if (!styleUpdates) {
styleUpdates = {};
}
styleUpdates[styleName] = '';
}
}
for (styleName in nextProp) {
+2 -3
View File
@@ -107,9 +107,8 @@ var DOMProperty = {
* attribute). Most default values are '' or false, but not all. Worse yet,
* some (in particular, `type`) vary depending on the type of element.
*
* TODO: Is it worth caching the test elements? Caching the properties
* ourselves (as opposed to accessing from a cached test element every time)
* looks probably worth it: http://jsperf.com/object-vs-element
* TODO: Is it better to grab all the possible properties when creating an
* element to avoid having to create the same element twice?
*/
getDefaultValueForProperty: function(nodeName, prop) {
var nodeDefaults = defaultValueCache[nodeName];