From fb09c2548f367779341706938969355748da1882 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sun, 22 Apr 2018 15:57:55 -0400 Subject: [PATCH] remove unused contextDependencies references --- src/generators/server-side-rendering/Block.ts | 1 - .../server-side-rendering/visitors/AwaitBlock.ts | 4 ---- src/generators/server-side-rendering/visitors/EachBlock.ts | 7 +------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/generators/server-side-rendering/Block.ts b/src/generators/server-side-rendering/Block.ts index 24ef567854..5b727dc828 100644 --- a/src/generators/server-side-rendering/Block.ts +++ b/src/generators/server-side-rendering/Block.ts @@ -14,7 +14,6 @@ export default class Block { contexts: Map; indexes: Map; - contextDependencies: Map; constructor(options: BlockOptions) { Object.assign(this, options); diff --git a/src/generators/server-side-rendering/visitors/AwaitBlock.ts b/src/generators/server-side-rendering/visitors/AwaitBlock.ts index 6251eb15c0..b24e8b3636 100644 --- a/src/generators/server-side-rendering/visitors/AwaitBlock.ts +++ b/src/generators/server-side-rendering/visitors/AwaitBlock.ts @@ -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 }); diff --git a/src/generators/server-side-rendering/visitors/EachBlock.ts b/src/generators/server-side-rendering/visitors/EachBlock.ts index 491a9fbc1c..4818ad548f 100644 --- a/src/generators/server-side-rendering/visitors/EachBlock.ts +++ b/src/generators/server-side-rendering/visitors/EachBlock.ts @@ -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) => {