Skip to content

Commit 6c475c3

Browse files
committed
chore: updated code
1 parent 5c9f3ab commit 6c475c3

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

packages/compiler-core/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export const isMemberExpressionNode = __BROWSER__
163163
return (
164164
ret.type === 'MemberExpression' ||
165165
ret.type === 'OptionalMemberExpression' ||
166-
ret.type === 'Identifier'
166+
(ret.type === 'Identifier' && ret.name !== 'undefined')
167167
)
168168
} catch (e) {
169169
return false

packages/runtime-dom/src/directives/vOn.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,9 @@ const modifierGuards: Record<
3535
export const withModifiers = <
3636
T extends (event: Event, ...args: unknown[]) => any
3737
>(
38-
fn: T & { _withMods?: { [key: string]: T } } ,
38+
fn: T & { _withMods?: { [key: string]: T } },
3939
modifiers: string[]
4040
) => {
41-
42-
if(!fn) {
43-
return
44-
}
4541
const cache = fn._withMods || (fn._withMods = {})
4642
const cacheKey = modifiers.join('.')
4743
return (

0 commit comments

Comments
 (0)