Check expression type before getting store name

pull/3534/head
Bryan Terce 5 years ago
parent 0a4caeb7e9
commit cfc7e6af5b
No known key found for this signature in database
GPG Key ID: DF2E2829CA6E5BF4

@ -121,7 +121,11 @@ export default class EachBlockWrapper extends Wrapper {
view_length: fixed_length === null ? `${iterations}.[✂${c}-${c+4}✂]` : fixed_length
};
const store = node.expression.node.name[0] === '$' ? node.expression.node.name.slice(1) : null;
const store =
node.expression.node.type === 'Identifier' &&
node.expression.node.name[0] === '$'
? node.expression.node.name.slice(1)
: null;
node.contexts.forEach(prop => {
this.block.bindings.set(prop.key.name, {

Loading…
Cancel
Save