Browse Source

chore: typo in variable name (#10358)

dev
Li Yongcheng 5 years ago
committed by Eduardo San Martin Morote
parent
commit
d40b7ddb81
  1. 6
      src/compiler/error-detector.js

6
src/compiler/error-detector.js

@ -57,9 +57,9 @@ function checkNode (node: ASTNode, warn: Function) {
}
function checkEvent (exp: string, text: string, warn: Function, range?: Range) {
const stipped = exp.replace(stripStringRE, '')
const keywordMatch: any = stipped.match(unaryOperatorsRE)
if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') {
const stripped = exp.replace(stripStringRE, '')
const keywordMatch: any = stripped.match(unaryOperatorsRE)
if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {
warn(
`avoid using JavaScript unary operator as property name: ` +
`"${keywordMatch[0]}" in expression ${text.trim()}`,

Loading…
Cancel
Save