]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fix: Interchange initialises own triggers
authorMilesStanton <MilesStanton@users.noreply.github.com>
Thu, 7 Nov 2019 10:38:24 +0000 (10:38 +0000)
committerGitHub <noreply@github.com>
Thu, 7 Nov 2019 10:38:24 +0000 (10:38 +0000)
Resolve issue where resizeme event will not trigger without other plugins, because triggers are never initialised.

js/foundation.interchange.js

index fcdd54c3fc141fce0a7764e85f78eee1307f7cf7..80b4fec81946a1f9689aae16da1ea57046fc669f 100644 (file)
@@ -5,6 +5,7 @@ import { MediaQuery } from './foundation.util.mediaQuery';
 import { Plugin } from './foundation.core.plugin';
 import { GetYoDigits } from './foundation.core.utils';
 
+import { Triggers } from './foundation.util.triggers';
 
 /**
  * Interchange module.
@@ -28,6 +29,9 @@ class Interchange extends Plugin {
     this.currentPath = '';
     this.className = 'Interchange'; // ie9 back compat
 
+    // Triggers init is idempotent, just need to make sure it is initialized
+    Triggers.init($);
+    
     this._init();
     this._events();
   }