fix(runtime-core): should remove no longer present camelCase props (#1413)
fix #1412
This commit is contained in:
@@ -190,13 +190,19 @@ export function updateProps(
|
||||
for (const key in rawCurrentProps) {
|
||||
if (
|
||||
!rawProps ||
|
||||
(!hasOwn(rawProps, key) &&
|
||||
(
|
||||
// for camelCase
|
||||
!hasOwn(rawProps, key) &&
|
||||
// it's possible the original props was passed in as kebab-case
|
||||
// and converted to camelCase (#955)
|
||||
((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))
|
||||
) {
|
||||
if (options) {
|
||||
if (rawPrevProps && rawPrevProps[kebabKey!] !== undefined) {
|
||||
if (rawPrevProps && (
|
||||
// for camelCase
|
||||
rawPrevProps[key] !== undefined ||
|
||||
// for kebab-case
|
||||
rawPrevProps[kebabKey!] !== undefined)) {
|
||||
props[key] = resolvePropValue(
|
||||
options,
|
||||
rawProps || EMPTY_OBJ,
|
||||
|
||||
Reference in New Issue
Block a user