|
@@ -311,7 +311,12 @@ export function processExpression(
|
|
|
} else {
|
|
} else {
|
|
|
// The identifier is considered constant unless it's pointing to a
|
|
// The identifier is considered constant unless it's pointing to a
|
|
|
// local scope variable (a v-for alias, or a v-slot prop)
|
|
// local scope variable (a v-for alias, or a v-slot prop)
|
|
|
- if (!(needPrefix && isLocal)) {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ !(needPrefix && isLocal) &&
|
|
|
|
|
+ parent.type !== 'CallExpression' &&
|
|
|
|
|
+ parent.type !== 'NewExpression' &&
|
|
|
|
|
+ parent.type !== 'MemberExpression'
|
|
|
|
|
+ ) {
|
|
|
;(node as QualifiedId).isConstant = true
|
|
;(node as QualifiedId).isConstant = true
|
|
|
}
|
|
}
|
|
|
// also generate sub-expressions for other identifiers for better
|
|
// also generate sub-expressions for other identifiers for better
|