Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / toolbar / js / escapeAdmin.es6.js
index c381f021c7085151910e92c80a9f8da15360058a..c91c9d847c4e8876ae3641190e0f52a91b70fced 100644 (file)
@@ -3,7 +3,7 @@
  * Replaces the home link in toolbar with a back to site link.
  */
 
-(function ($, Drupal, drupalSettings) {
+(function($, Drupal, drupalSettings) {
   const pathInfo = drupalSettings.path;
   const escapeAdminPath = sessionStorage.getItem('escapeAdminPath');
   const windowLocation = window.location;
   // back to it when browsing administrative pages. If there is a destination
   // parameter there is not need to save the current path because the page is
   // loaded within an existing "workflow".
-  if (!pathInfo.currentPathIsAdmin && !/destination=/.test(windowLocation.search)) {
+  if (
+    !pathInfo.currentPathIsAdmin &&
+    !/destination=/.test(windowLocation.search)
+  ) {
     sessionStorage.setItem('escapeAdminPath', windowLocation);
   }
 
    */
   Drupal.behaviors.escapeAdmin = {
     attach() {
-      const $toolbarEscape = $('[data-toolbar-escape-admin]').once('escapeAdmin');
+      const $toolbarEscape = $('[data-toolbar-escape-admin]').once(
+        'escapeAdmin',
+      );
       if ($toolbarEscape.length && pathInfo.currentPathIsAdmin) {
         if (escapeAdminPath !== null) {
           $toolbarEscape.attr('href', escapeAdminPath);
-        }
-        else {
+        } else {
           $toolbarEscape.text(Drupal.t('Home'));
         }
       }
     },
   };
-}(jQuery, Drupal, drupalSettings));
+})(jQuery, Drupal, drupalSettings);