diff --git a/addon/collapse-key.js b/addon/collapse-key.js index 1736016..e1752dd 100644 --- a/addon/collapse-key.js +++ b/addon/collapse-key.js @@ -5,15 +5,15 @@ export default function(property) { return [property]; } - let atEachIndex = property.indexOf('@each.'); - if (atEachIndex === -1) { - atEachIndex = property.indexOf('[]'); + let arrayIndex = property.indexOf('@each.'); + if (arrayIndex === -1) { + arrayIndex = property.indexOf('[]'); } - if (atEachIndex === 0) { + if (arrayIndex === 0) { return ['']; - } else if (atEachIndex > 0) { - return [property.slice(0, atEachIndex - 1)]; + } else if (arrayIndex > 0) { + return [property.slice(0, arrayIndex - 1)]; } return expandProperty(property);