mirror of https://github.com/vuejs/core.git
wip: fix runtimeConstant marking
This commit is contained in:
parent
0ca9137188
commit
292a657861
|
@ -100,13 +100,6 @@ export function processExpression(
|
||||||
}
|
}
|
||||||
|
|
||||||
const { inline, bindingMetadata } = context
|
const { inline, bindingMetadata } = context
|
||||||
|
|
||||||
// const bindings exposed from setup - we know they never change
|
|
||||||
if (bindingMetadata[node.content] === BindingTypes.CONST) {
|
|
||||||
node.isRuntimeConstant = true
|
|
||||||
return node
|
|
||||||
}
|
|
||||||
|
|
||||||
const prefix = (raw: string) => {
|
const prefix = (raw: string) => {
|
||||||
const type = hasOwn(bindingMetadata, raw) && bindingMetadata[raw]
|
const type = hasOwn(bindingMetadata, raw) && bindingMetadata[raw]
|
||||||
if (inline) {
|
if (inline) {
|
||||||
|
@ -138,6 +131,10 @@ export function processExpression(
|
||||||
// bail on parens to prevent any possible function invocations.
|
// bail on parens to prevent any possible function invocations.
|
||||||
const bailConstant = rawExp.indexOf(`(`) > -1
|
const bailConstant = rawExp.indexOf(`(`) > -1
|
||||||
if (isSimpleIdentifier(rawExp)) {
|
if (isSimpleIdentifier(rawExp)) {
|
||||||
|
// const bindings exposed from setup - we know they never change
|
||||||
|
if (bindingMetadata[node.content] === BindingTypes.CONST) {
|
||||||
|
node.isRuntimeConstant = true
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
!asParams &&
|
!asParams &&
|
||||||
!context.identifiers[rawExp] &&
|
!context.identifiers[rawExp] &&
|
||||||
|
|
Loading…
Reference in New Issue