Commit 43d6284 Brian Kim
committed
1 parent e5a481b commit 43d6284 Copy full SHA for 43d6284
File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -267,14 +267,16 @@ export function createElement<TTag extends Tag>(
267
267
props = { } as TagProps < TTag > ;
268
268
}
269
269
270
- for ( const propPrefix of DEPRECATED_PROP_PREFIXES ) {
271
- for ( const propName of SPECIAL_PROP_BASES ) {
272
- const deprecatedPropName = propPrefix + propName ;
270
+ for ( let i = 0 ; i < DEPRECATED_PROP_PREFIXES . length ; i ++ ) {
271
+ const propPrefix = DEPRECATED_PROP_PREFIXES [ i ] ;
272
+ for ( let j = 0 ; j < SPECIAL_PROP_BASES . length ; j ++ ) {
273
+ const propBase = SPECIAL_PROP_BASES [ j ] ;
274
+ const deprecatedPropName = propPrefix + propBase ;
273
275
if ( deprecatedPropName in ( props as TagProps < TTag > ) ) {
274
276
console . warn (
275
- `The \`${ deprecatedPropName } \` prop is deprecated. Use \`${ propName } \` instead.` ,
277
+ `The \`${ deprecatedPropName } \` prop is deprecated. Use \`${ propBase } \` instead.` ,
276
278
) ;
277
- ( props as TagProps < TTag > ) [ propName ] = ( props as TagProps < TTag > ) [
279
+ ( props as TagProps < TTag > ) [ propBase ] = ( props as TagProps < TTag > ) [
278
280
deprecatedPropName
279
281
] ;
280
282
}
You can’t perform that action at this time.
0 commit comments