From 02b01dcea0fd61048fc1a91430549da522755a5c Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Thu, 17 May 2018 09:31:05 +0100 Subject: [PATCH] Small changes per review --- blocks/store/actions.js | 2 +- blocks/store/selectors.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blocks/store/actions.js b/blocks/store/actions.js index c743f81d47623..dafdde6fb4b93 100644 --- a/blocks/store/actions.js +++ b/blocks/store/actions.js @@ -18,7 +18,7 @@ export function addBlockTypes( blockTypes ) { } /** - * Returns an action object used in signalling that block types have been added. + * Returns an action object used in signalling that block types have been implemented. * * @param {Array|Object} implementations Block types implementations. * diff --git a/blocks/store/selectors.js b/blocks/store/selectors.js index 903476144c38c..de5b325bb4826 100644 --- a/blocks/store/selectors.js +++ b/blocks/store/selectors.js @@ -2,7 +2,7 @@ * External dependencies */ import createSelector from 'rememo'; -import { mapValues, compact } from 'lodash'; +import { mapValues, compact, get } from 'lodash'; /** * Returns all the available block types. @@ -40,7 +40,7 @@ export const getBlockType = createSelector( ...blockTypeDefinition, ...blockTypeImplementation, attributes: mapValues( blockTypeDefinition.attributes, ( attribute, key ) => { - const implementationAttribute = blockTypeImplementation.attributes ? blockTypeImplementation.attributes[ key ] : {}; + const implementationAttribute = get( blockTypeImplementation.attributes, [ key ], {} ); return { ...attribute, ...implementationAttribute,