[NFC] Update package-lock and civicrm_generated to fix langague issues
[civicrm-core.git] / js / crm.drupal8.js
index 74e64cb779290f261b403dddcce74bd3f54a3afa..ea8dadd79f6215d0f6b43aa586d600387b4e9259 100644 (file)
@@ -5,7 +5,7 @@ localStorage.setItem('Drupal.toolbar.activeTabID', JSON.stringify('toolbar-item-
 
 (function($) {
   function adjustToggle() {
-    if ($(window).width() < 768) {
+    if ($(window).width() < 768 && $('#toolbar-item-civicrm').length) {
       $('#civicrm-menu-nav .crm-menubar-toggle-btn').css({
         left: '' + $('#toolbar-item-civicrm').offset().left + 'px',
         width: '' + $('#toolbar-item-civicrm').innerWidth() + 'px'