Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / block / js / block.admin.es6.js
index 197bc4beadd6460a4f9383152e68e76f2e613361..ff4d8eb20df24b7bb589b5473b55131371eebd4c 100644 (file)
@@ -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')