diff --git a/src/parse-name.js b/src/parse-name.js index a3c1562..a8844f0 100644 --- a/src/parse-name.js +++ b/src/parse-name.js @@ -51,7 +51,7 @@ export default function parseName(source) { } else if (/^(['"])([^\1]+)\1$/.test(propAccessorLiteral)) { // for string literal - result.push(propAccessorLiteral.slice(1, propAccessorLiteral.length - 1)); + result.push(propAccessorLiteral.slice(1, -1)); } term = term.slice(propAccessorEnd + 1);