X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fblock%2Fjs%2Fblock.admin.es6.js;h=ff4d8eb20df24b7bb589b5473b55131371eebd4c;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=197bc4beadd6460a4f9383152e68e76f2e613361;hpb=0bf8d09d2542548982e81a441b1f16e75873a04f;p=yaffs-website diff --git a/web/core/modules/block/js/block.admin.es6.js b/web/core/modules/block/js/block.admin.es6.js index 197bc4bea..ff4d8eb20 100644 --- a/web/core/modules/block/js/block.admin.es6.js +++ b/web/core/modules/block/js/block.admin.es6.js @@ -93,7 +93,8 @@ */ Drupal.behaviors.blockHighlightPlacement = { attach(context, settings) { - if (settings.blockPlacement) { + // Ensure that the block we are attempting to scroll to actually exists. + if (settings.blockPlacement && $('.js-block-placed').length) { $(context) .find('[data-drupal-selector="edit-blocks"]') .once('block-highlight')