Browse Source

Quick fix for an issue found while checking string templates.

gh-pages
mike12345567 6 years ago
parent
commit
6429750081
  1. 3
      packages/string-templates/src/processors/preprocessor.js

3
packages/string-templates/src/processors/preprocessor.js

@ -31,7 +31,8 @@ module.exports.processors = [
statement = swapStrings(statement, startBraceIdx + lastIdx, 1, ".[")
}
lastIdx = startBraceIdx + 1
startBraceIdx = statement.substring(lastIdx + 1).indexOf("[")
const nextBraceIdx = statement.substring(lastIdx + 1).indexOf("[")
startBraceIdx = nextBraceIdx > 0 ? lastIdx + 1 + nextBraceIdx : -1
}
return statement
}),

Loading…
Cancel
Save