Skip to content

Commit 14abbe7

Browse files
committed
Blocks: Save embed with empty markup when URL not selected
1 parent 72a8b28 commit 14abbe7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

blocks/library/embed/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ function getEmbedBlockSettings( { title, icon, category = 'embed', transforms, k
219219
save( { attributes } ) {
220220
const { url, caption, align } = attributes;
221221

222+
if ( ! url ) {
223+
return;
224+
}
225+
222226
return (
223227
<figure className={ align ? `align${ align }` : null }>
224228
{ `\n${ url }\n` /* URL needs to be on its own line. */ }

0 commit comments

Comments
 (0)