From 2e37145f8995e16984e975121cff7a2ccb2d8647 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Thu, 30 Nov 2017 16:46:48 -0500 Subject: [PATCH] Blocks: Clarify intentions for bad code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not my proudest work 🙂 --- blocks/library/columns/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blocks/library/columns/index.js b/blocks/library/columns/index.js index 30798bac794de0..a5ea1695340955 100644 --- a/blocks/library/columns/index.js +++ b/blocks/library/columns/index.js @@ -46,6 +46,8 @@ registerBlockType( 'core/columns', { edit( { attributes, setAttributes, setChildren, children, className, focus } ) { const { columns } = attributes; + // TODO: Refactor setChildFragment to be less awful, separated, tested. + const setChildFragment = ( index ) => ( nextChildren ) => { const fragmented = mapChildren( children, columns, identity ); const origNumChildren = fragmented[ index ].length;