Browse Source
chore: update reference to transformExpressions (#2682) [ci skip]
pull/5890/head
Damon Muma
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
packages/compiler-dom/src/transforms/stringifyStatic.ts
|
|
@ -330,7 +330,7 @@ function stringifyElement( |
|
|
|
// here, e.g. `{{ 1 }}` or `{{ 'foo' }}`
|
|
|
|
// in addition, constant exps bail on presence of parens so you can't even
|
|
|
|
// run JSFuck in here. But we mark it unsafe for security review purposes.
|
|
|
|
// (see compiler-core/src/transformExpressions)
|
|
|
|
// (see compiler-core/src/transforms/transformExpression)
|
|
|
|
function evaluateConstant(exp: ExpressionNode): string { |
|
|
|
if (exp.type === NodeTypes.SIMPLE_EXPRESSION) { |
|
|
|
return new Function(`return ${exp.content}`)() |
|
|
|