From 8b0f768e5a7e9c5b033eb7928276be4b7e5344ce Mon Sep 17 00:00:00 2001 From: morgan Date: Fri, 10 Nov 2017 08:47:02 +1000 Subject: [PATCH] use lodash version of startsWith --- blocks/api/serializer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blocks/api/serializer.js b/blocks/api/serializer.js index 5d4c48e25b5e2..2c6980810e9c3 100644 --- a/blocks/api/serializer.js +++ b/blocks/api/serializer.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { isEmpty, reduce, isObject, castArray, compact } from 'lodash'; +import { isEmpty, reduce, isObject, castArray, compact, startsWith } from 'lodash'; import { html as beautifyHtml } from 'js-beautify'; import classnames from 'classnames'; @@ -179,7 +179,7 @@ export function getCommentDelimitedContent( rawBlockName, attributes, content ) ''; // strip core blocks of their namespace prefix - const blockName = rawBlockName.startsWith( 'core/' ) ? + const blockName = startsWith( rawBlockName, 'core/' ) ? rawBlockName.slice( 5 ) : rawBlockName;