@@ -55,29 +55,31 @@ export const parsePropertyValue = (propValue: unknown, propType: number): any =>
55
55
return deserializeProperty ( propValue ) ;
56
56
}
57
57
58
- /**
59
- * ensure this value is of the correct prop type
60
- */
61
- if ( BUILD . propBoolean && propType & MEMBER_FLAGS . Boolean ) {
58
+ if ( propValue != null && ! isComplexType ( propValue ) ) {
62
59
/**
63
- * per the HTML spec, any string value means it is a boolean true value
64
- * but we'll cheat here and say that the string "false" is the boolean false
60
+ * ensure this value is of the correct prop type
65
61
*/
66
- return propValue === 'false' ? false : propValue === '' || ! ! propValue ;
67
- }
62
+ if ( BUILD . propBoolean && propType & MEMBER_FLAGS . Boolean ) {
63
+ /**
64
+ * per the HTML spec, any string value means it is a boolean true value
65
+ * but we'll cheat here and say that the string "false" is the boolean false
66
+ */
67
+ return propValue === 'false' ? false : propValue === '' || ! ! propValue ;
68
+ }
68
69
69
- /**
70
- * force it to be a number
71
- */
72
- if ( typeof propValue === 'string' && BUILD . propNumber && propType & MEMBER_FLAGS . Number ) {
73
- return parseFloat ( propValue ) ;
74
- }
70
+ /**
71
+ * force it to be a number
72
+ */
73
+ if ( BUILD . propNumber && propType & MEMBER_FLAGS . Number ) {
74
+ return parseFloat ( propValue ) ;
75
+ }
75
76
76
- /**
77
- * could have been passed as a number or boolean but we still want it as a string
78
- */
79
- if ( BUILD . propString && propType & MEMBER_FLAGS . String ) {
80
- return String ( propValue ) ;
77
+ /**
78
+ * could have been passed as a number or boolean but we still want it as a string
79
+ */
80
+ if ( BUILD . propString && propType & MEMBER_FLAGS . String ) {
81
+ return String ( propValue ) ;
82
+ }
81
83
}
82
84
83
85
/**
0 commit comments