projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8526531
)
dev/core#968 Fix javascript error on public pages
author
colemanw
<coleman@civicrm.org>
Sat, 25 May 2019 19:15:19 +0000
(15:15 -0400)
committer
Coleman Watts
<coleman@civicrm.org>
Sun, 26 May 2019 02:05:57 +0000
(22:05 -0400)
Checks for the existence of the toolbar item before referencing it.
js/crm.drupal8.js
patch
|
blob
|
blame
|
history
diff --git
a/js/crm.drupal8.js
b/js/crm.drupal8.js
index 74e64cb779290f261b403dddcce74bd3f54a3afa..ea8dadd79f6215d0f6b43aa586d600387b4e9259 100644
(file)
--- a/
js/crm.drupal8.js
+++ b/
js/crm.drupal8.js
@@
-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'