diff --git a/src/postmeta/wp-postmeta-detectlinks.js b/src/postmeta/wp-postmeta-detectlinks.js index 2e4a93f..e449ae5 100644 --- a/src/postmeta/wp-postmeta-detectlinks.js +++ b/src/postmeta/wp-postmeta-detectlinks.js @@ -5,6 +5,11 @@ import { PluginDocumentSettingPanel } from '@wordpress/edit-post'; import { ToggleControl, PanelRow } from '@wordpress/components'; const WikipediaPreviewPostMetaDetectLinks = ( { postMeta, setPostMeta } ) => { + if ( postMeta === undefined ) { + // this is probably a custom post type + // without 'custom-fields' support + return; + } return (