mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix nit and comment
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user