Skip to content

Commit

Permalink
Fix flow
Browse files Browse the repository at this point in the history
  • Loading branch information
atnpcg committed Oct 23, 2020
1 parent 38beab2 commit 5df3879
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions packages/react-dom/src/shared/DOMProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

import {enableFilterEmptyStringAttributesDOM} from 'shared/ReactFeatureFlags';
import { boolean } from 'yargs';

type PropertyType = 0 | 1 | 2 | 3 | 4 | 5 | 6;

Expand Down Expand Up @@ -53,6 +54,7 @@ export type PropertyInfo = {|
+type: PropertyType,
+sanitizeURL: boolean,
+removeEmptyString: boolean,
+propertyMustUseAttribute: boolean,
|};

/* eslint-disable max-len */
Expand Down Expand Up @@ -261,6 +263,7 @@ reservedProps.forEach(name => {
null, // attributeNamespace
false, // sanitizeURL
false, // removeEmptyString
false, // propertyMustUseAttribute
);
});

Expand All @@ -280,6 +283,7 @@ reservedProps.forEach(name => {
null, // attributeNamespace
false, // sanitizeURL
false, // removeEmptyString
false, // propertyMustUseAttribute
);
});

Expand All @@ -295,6 +299,7 @@ reservedProps.forEach(name => {
null, // attributeNamespace
false, // sanitizeURL
false, // removeEmptyString
false, // propertyMustUseAttribute
);
});

Expand All @@ -316,6 +321,7 @@ reservedProps.forEach(name => {
null, // attributeNamespace
false, // sanitizeURL
false, // removeEmptyString
false, // propertyMustUseAttribute
);
});

Expand Down Expand Up @@ -356,6 +362,7 @@ reservedProps.forEach(name => {
null, // attributeNamespace
false, // sanitizeURL
false, // removeEmptyString
false, // propertyMustUseAttribute
);
});

Expand All @@ -380,7 +387,7 @@ reservedProps.forEach(name => {
null, // attributeNamespace
false, // sanitizeURL
false, // removeEmptyString
false, //propertyMustUseAttribute
false, // propertyMustUseAttribute
);
});

Expand Down Expand Up @@ -416,7 +423,7 @@ reservedProps.forEach(name => {
null, // attributeNamespace
false, // sanitizeURL
false, // removeEmptyString
false, //propertyMustUseAttribute
false, // propertyMustUseAttribute
);
});

Expand All @@ -439,7 +446,7 @@ reservedProps.forEach(name => {
null, // attributeNamespace
false, // sanitizeURL
false, // removeEmptyString
false, //propertyMustUseAttribute
false, // propertyMustUseAttribute
);
});

Expand All @@ -453,7 +460,7 @@ reservedProps.forEach(name => {
null, // attributeNamespace
false, // sanitizeURL
false, // removeEmptyString
false, //propertyMustUseAttribute
false, // propertyMustUseAttribute
);
});

Expand Down Expand Up @@ -553,7 +560,7 @@ const capitalize = token => token[1].toUpperCase();
null, // attributeNamespace
false, // sanitizeURL
false, // removeEmptyString
false, //propertyMustUseAttribute
false, // propertyMustUseAttribute
);
});

Expand All @@ -579,7 +586,7 @@ const capitalize = token => token[1].toUpperCase();
'http://www.w3.org/1999/xlink',
false, // sanitizeURL
false, // removeEmptyString
false, //propertyMustUseAttribute
false, // propertyMustUseAttribute
);
});

Expand All @@ -602,7 +609,7 @@ const capitalize = token => token[1].toUpperCase();
'http://www.w3.org/XML/1998/namespace',
false, // sanitizeURL
false, // removeEmptyString
false, //propertyMustUseAttribute
false, // propertyMustUseAttribute
);
});

Expand All @@ -618,6 +625,7 @@ const capitalize = token => token[1].toUpperCase();
null, // attributeNamespace
false, // sanitizeURL
false, // removeEmptyString
false, // propertyMustUseAttribute
);
});

Expand All @@ -632,7 +640,7 @@ properties[xlinkHref] = new PropertyInfoRecord(
'http://www.w3.org/1999/xlink',
true, // sanitizeURL
false, // removeEmptyString
false, //propertyMustUseAttribute
false, // propertyMustUseAttribute
);

['src', 'href', 'action', 'formAction'].forEach(attributeName => {
Expand All @@ -644,6 +652,6 @@ properties[xlinkHref] = new PropertyInfoRecord(
null, // attributeNamespace
true, // sanitizeURL
true, // removeEmptyString
false, //propertyMustUseAttribute
false, // propertyMustUseAttribute
);
});

0 comments on commit 5df3879

Please sign in to comment.