fix(runtime-core): fix emit listener check on kebab-case events (#2542)
fix #2540
This commit is contained in:
@@ -201,9 +201,10 @@ export function isEmitListener(
|
||||
if (!options || !isOn(key)) {
|
||||
return false
|
||||
}
|
||||
key = key.replace(/Once$/, '')
|
||||
key = key.slice(2).replace(/Once$/, '')
|
||||
return (
|
||||
hasOwn(options, key[2].toLowerCase() + key.slice(3)) ||
|
||||
hasOwn(options, key.slice(2))
|
||||
hasOwn(options, key[0].toLowerCase() + key.slice(1)) ||
|
||||
hasOwn(options, hyphenate(key)) ||
|
||||
hasOwn(options, key)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user