feat(compiler): ensure interpolation expressions are wrapped with toString()

This commit is contained in:
Evan You
2019-09-23 15:36:30 -04:00
parent e09e887219
commit b3b67b8c7d
23 changed files with 148 additions and 50 deletions

View File

@@ -523,6 +523,7 @@ function parseAttribute(
type: NodeTypes.EXPRESSION,
content,
isStatic,
isInterpolation: false,
loc
}
}
@@ -540,6 +541,7 @@ function parseAttribute(
type: NodeTypes.EXPRESSION,
content: value.content,
isStatic: false,
isInterpolation: false,
loc: value.loc
},
arg,
@@ -626,7 +628,8 @@ function parseInterpolation(
type: NodeTypes.EXPRESSION,
content,
loc: getSelection(context, start),
isStatic: content === ''
isStatic: content === '',
isInterpolation: true
}
}