# speechkit/7.0.0/src/editor/components/error-notice/check.js

BeyondWords – AI audio for publishers, version 7.0.0. 30 lines.

- Page: https://pluginprobe.com/plugins/speechkit/7.0.0/code/src/editor/components/error-notice/check.js
- Raw: https://pluginprobe.com/plugins/speechkit/7.0.0/raw/src/editor/components/error-notice/check.js
- Modified: 2026-08-12T09:46:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/speechkit/7.0.0/code/src/editor/components/error-notice/check.js#L10-L20`.

```javascript
/**
 * WordPress dependencies
 */
import { compose } from '@wordpress/compose';
import { withSelect } from '@wordpress/data';

export function ErrorNoticeCheck( { hasErrorNoticeAction, children } ) {
	if ( ! hasErrorNoticeAction ) {
		return null;
	}

	return children;
}

export default compose( [
	withSelect( ( select ) => {
		const { getEditedPostAttribute } = select( 'core/editor' );

		const beyondwordsErrorMessage =
			getEditedPostAttribute( 'meta' ).beyondwords_error_message;
		const speechkitErrorMessage =
			getEditedPostAttribute( 'meta' ).speechkit_error_message;

		return {
			hasErrorNoticeAction:
				!! beyondwordsErrorMessage || !! speechkitErrorMessage,
		};
	} ),
] )( ErrorNoticeCheck );

```
