From 86cfc2bd240933aaef22248860a0644afbcfd5c7 Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Thu, 24 Sep 2020 17:44:02 +1000 Subject: [PATCH] Layout Export: Improve Block Editor detection --- js/siteorigin-panels/dialog/prebuilt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/siteorigin-panels/dialog/prebuilt.js b/js/siteorigin-panels/dialog/prebuilt.js index d01ddc991..2737c0028 100644 --- a/js/siteorigin-panels/dialog/prebuilt.js +++ b/js/siteorigin-panels/dialog/prebuilt.js @@ -172,7 +172,7 @@ module.exports = panels.view.dialog.extend( { var postName = $( 'input[name="post_title"], .editor-post-title__input' ).val(); if ( ! postName ) { postName = $('input[name="post_ID"]').val(); - } else if ( typeof wp.data != 'undefined' ) { + } else if ( $( '.block-editor-page' ).length ) { var currentBlockPosition = thisView.getCurrentBlockPosition(); if ( currentBlockPosition >= 0 ) { postName += '-' + currentBlockPosition;