diff --git a/packages/editor/src/bindings/post-meta.js b/packages/editor/src/bindings/post-meta.js index 100c8802696fe..20013bd8f246b 100644 --- a/packages/editor/src/bindings/post-meta.js +++ b/packages/editor/src/bindings/post-meta.js @@ -18,7 +18,9 @@ function getMetadata( registry, context, registeredFields ) { // Populate the `metaFields` object with the default values. Object.entries( registeredFields || {} ).forEach( ( [ key, props ] ) => { - metaFields[ key ] = props.default; + if ( props.default ) { + metaFields[ key ] = props.default; + } } ); } else { @@ -47,7 +49,7 @@ export default { const metaKey = source.args.key; newValues[ attributeName ] = metaFields?.[ metaKey ] ?? - registeredFields?.[ metaKey ]?.label ?? + registeredFields?.[ metaKey ]?.title ?? metaKey; } return newValues;