Skip to content

Commit 145674c

Browse files
authored
Merge pull request #1018 from cloudinary/fix/generate-press-terms
Don't initialize the Term inspector if our wrapper is not in the page
2 parents 1c9690e + ead10ab commit 145674c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

js/block-editor.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => 'c8e1eb2b75a7df74cf6a');
1+
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => '9b0123a912a0a6182e6b');

js/block-editor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/components/terms-inspector.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ const Terms = {
2323
fetchWait: null,
2424
_init() {
2525
this.wrapper = document.getElementById( 'cld-tax-items' );
26+
27+
if ( ! this.wrapper ) {
28+
return;
29+
}
30+
2631
const { getTaxonomies } = select( 'core' );
2732
// At the given time, not enough options are available to detect when core requests are ready.
2833
this.fetchWait = setInterval( () => {

0 commit comments

Comments
 (0)