From 0b4ac69c907d6b817f6bea5cd702e6e32d7aa475 Mon Sep 17 00:00:00 2001 From: alexmerz Date: Mon, 23 Oct 2023 12:58:56 +0200 Subject: [PATCH] Test data.documentElement is actually present We were running into the issue that Carbon-Fields would interfere with an AJAX call from another plugin on the edit-tags page. The added condition makes sure that the last condition in the filter callback does not raise an exception during the test. --- packages/metaboxes/containers/term-meta/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/metaboxes/containers/term-meta/index.js b/packages/metaboxes/containers/term-meta/index.js index efe2fd238..5dbcd68d3 100644 --- a/packages/metaboxes/containers/term-meta/index.js +++ b/packages/metaboxes/containers/term-meta/index.js @@ -32,6 +32,7 @@ function aperture() { return options.data && options.data.indexOf( 'carbon_fields_container' ) > -1 && options.data.indexOf( 'add-tag' ) > -1 + && data.documentElement && ! data.documentElement.querySelector( 'wp_error' ); } ) );