summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormicropat2016-09-20 14:44:51 -0700
committermicropat2016-09-20 14:44:51 -0700
commit97931f77ea87cd812f518a4015eba93a9ab2c1be (patch)
treef4a632c6aba30a369b1ac744824ec974a18807d2
parent69e3d703db0b18b40a7c0dfdc92caf92532aef2e (diff)
Reference the window object for a2a global
Because we’re in strict mode, avoid a reference error when a2a is unavailable (i.e. when the client isn’t loading page.js for some reason). Issue #2721607
-rw-r--r--js/addtoany.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/addtoany.js b/js/addtoany.js
index 8d87eb5..0346c17 100644
--- a/js/addtoany.js
+++ b/js/addtoany.js
@@ -5,7 +5,7 @@
Drupal.behaviors.addToAny = {
attach: function (context, settings) {
// If not the full document (it's probably AJAX), and window.a2a exists
- if (context !== document && a2a) {
+ if (context !== document && window.a2a) {
a2a.init_all('page'); // Init all uninitiated AddToAny instances
}
}