Skip to content

Commit 3ed85a4

Browse files
committed
rebuild the main javascript file
1 parent 377eac8 commit 3ed85a4

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

js/yoast-acf-analysis.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ Cache.prototype.clear = function( store ) {
199199
module.exports = new Cache();
200200

201201
},{}],4:[function(require,module,exports){
202-
/* global _, acf, jQuery, wp */
202+
/* global _, acf, jQuery, wp, window */
203+
203204
module.exports = function() {
204205
var outerFieldsName = [
205206
"flexible_content",
@@ -211,9 +212,12 @@ module.exports = function() {
211212
var outerFields = [];
212213
var acfFields = [];
213214

214-
if ( wp.data.select( "core/block-editor" ) ) {
215-
// Return only fields in metabox areas (either below or side) or
216-
// ACF block fields in the content (not in the sidebar, to prevent duplicates)
215+
// Check if Gutenberg editor is used.
216+
if ( window.wpseoScriptData.isBlockEditor ) {
217+
/*
218+
* Return only fields in metabox areas (either below or side) or
219+
* ACF block fields in the content (not in the sidebar, to prevent duplicates).
220+
*/
217221
var parentContainer = jQuery( ".metabox-location-normal, .metabox-location-side, .acf-block-component.acf-block-body" );
218222
acfFields = acf.get_fields( false, parentContainer );
219223
} else {

0 commit comments

Comments
 (0)