We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24b1c1d commit bae79ddCopy full SHA for bae79dd
packages/compiler-core/__tests__/utils.spec.ts
@@ -122,6 +122,10 @@ describe('isMemberExpression', () => {
122
expect(fn(`123[a]`)).toBe(true)
123
expect(fn(`foo() as string`)).toBe(false)
124
expect(fn(`a + b as string`)).toBe(false)
125
+ // #9865
126
+ expect(fn('""')).toBe(false)
127
+ expect(fn('undefined')).toBe(false)
128
+ expect(fn('null')).toBe(false)
129
})
130
131
packages/compiler-core/src/utils.ts
@@ -163,7 +163,7 @@ export const isMemberExpressionNode = __BROWSER__
163
return (
164
ret.type === 'MemberExpression' ||
165
ret.type === 'OptionalMemberExpression' ||
166
- ret.type === 'Identifier'
+ (ret.type === 'Identifier' && ret.name !== 'undefined')
167
)
168
} catch (e) {
169
return false
0 commit comments