diff --git a/src/generators/Generator.js b/src/generators/Generator.js index 179cb2ee15..b39c9d752b 100644 --- a/src/generators/Generator.js +++ b/src/generators/Generator.js @@ -63,8 +63,6 @@ export default class Generator { } contextualise ( block, expression, context, isEventHandler ) { - if ( expression._contextualised ) return expression._contextualised; - this.addSourcemapLocations( expression ); const usedContexts = []; @@ -155,13 +153,11 @@ export default class Generator { } }); - expression._contextualised = { + return { dependencies, contexts: usedContexts, snippet: `[✂${expression.start}-${expression.end}✂]` }; - - return expression._contextualised; } findDependencies ( block, expression, isEventHandler ) { diff --git a/src/generators/dom/visitors/EachBlock.js b/src/generators/dom/visitors/EachBlock.js index 9f2b63b180..770de73235 100644 --- a/src/generators/dom/visitors/EachBlock.js +++ b/src/generators/dom/visitors/EachBlock.js @@ -187,7 +187,7 @@ function unkeyed ( generator, block, state, node, snippet, { create_each_block, } ` ); - const { dependencies } = block.contextualise( node.expression ); + const dependencies = block.findDependencies( node.expression ); const allDependencies = new Set( block.dependencies ); dependencies.forEach( dependency => { allDependencies.add( dependency );