fix(compat): ensure fallthrough *Native events are not dropped during props update (#5228)

This commit is contained in:
Thorsten Lünborg 2022-01-21 07:21:42 +01:00 committed by GitHub
parent e603fd258c
commit 97f6bd942f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,7 +303,11 @@ export function updateProps(
// attrs point to the same object so it should already have been updated.
if (attrs !== rawCurrentProps) {
for (const key in attrs) {
if (!rawProps || !hasOwn(rawProps, key)) {
if (
!rawProps ||
(!hasOwn(rawProps, key) &&
(!__COMPAT__ || !hasOwn(rawProps, key + 'Native')))
) {
delete attrs[key]
hasAttrsChanged = true
}