From 2bec32fd4f053889f5f42364095887e35f36d633 Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Mon, 1 May 2017 14:50:12 -0400 Subject: [PATCH] remove redundant ternary --- src/generators/dom/visitors/EachBlock.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generators/dom/visitors/EachBlock.js b/src/generators/dom/visitors/EachBlock.js index 641ad9b8b5..1657a6b9ac 100644 --- a/src/generators/dom/visitors/EachBlock.js +++ b/src/generators/dom/visitors/EachBlock.js @@ -125,7 +125,7 @@ function keyed ( generator, block, state, node, snippet, { each_block, create_ea create.addBlock( deindent` var ${key} = ${each_block_value}[${i}].${node.key}; - ${iterations}[${i}] = ${lookup}[ ${key} ] = ${create_each_block}( ${params}, ${each_block_value}, ${each_block_value}[${i}], ${i}, ${block.component}${node.key ? `, ${key}` : `` } ); + ${iterations}[${i}] = ${lookup}[ ${key} ] = ${create_each_block}( ${params}, ${each_block_value}, ${each_block_value}[${i}], ${i}, ${block.component}, ${key} ); ` ); if ( state.parentNode ) { @@ -164,7 +164,7 @@ function keyed ( generator, block, state, node, snippet, { each_block, create_ea if ( ${lookup}[ ${key} ] ) { ${consequent} } else { - ${_iterations}[${i}] = ${_lookup}[ ${key} ] = ${create_each_block}( ${params}, ${each_block_value}, ${each_block_value}[${i}], ${i}, ${block.component}${node.key ? `, ${key}` : `` } ); + ${_iterations}[${i}] = ${_lookup}[ ${key} ] = ${create_each_block}( ${params}, ${each_block_value}, ${each_block_value}[${i}], ${i}, ${block.component}, ${key} ); } ${_iterations}[${i}].${mountOrIntro}( ${fragment}, null );