remove unused contextDependencies references

pull/1367/head
Rich Harris 7 years ago
parent a7c1c380d4
commit fb09c2548f

@ -14,7 +14,6 @@ export default class Block {
contexts: Map<string, string>;
indexes: Map<string, string>;
contextDependencies: Map<string, string[]>;
constructor(options: BlockOptions) {
Object.assign(this, options);

@ -16,11 +16,7 @@ export default function visitAwaitBlock(
const contexts = new Map(block.contexts);
contexts.set(node.value, '__value');
const contextDependencies = new Map(block.contextDependencies);
contextDependencies.set(node.value, dependencies);
const childBlock = block.child({
contextDependencies,
contexts
});

@ -22,20 +22,15 @@ export default function visitEachBlock(
const indexes = new Map(block.indexes);
if (node.index) indexes.set(node.index, node.context);
const contextDependencies = new Map(block.contextDependencies);
contextDependencies.set(node.context, dependencies);
if (node.destructuredContexts) {
for (let i = 0; i < node.destructuredContexts.length; i += 1) {
contexts.set(node.destructuredContexts[i], `${node.context}[${i}]`);
contextDependencies.set(node.destructuredContexts[i], dependencies);
}
}
const childBlock = block.child({
contexts,
indexes,
contextDependencies,
indexes
});
node.children.forEach((child: Node) => {

Loading…
Cancel
Save