From: Nicolas Coden Date: Sun, 18 Mar 2018 20:36:06 +0000 (+0100) Subject: fix: fix reference to component in `Magellan._events` X-Git-Tag: v6.6.0~11^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11158%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix: fix reference to component in `Magellan._events` Bug introduced in https://github.com/zurb/foundation-sites/pull/10988 (6371c6da3de11adf3dce181ec5b7cd5959fe5f8d) --- diff --git a/js/foundation.magellan.js b/js/foundation.magellan.js index 3732e9967..512e3f570 100644 --- a/js/foundation.magellan.js +++ b/js/foundation.magellan.js @@ -99,7 +99,7 @@ class Magellan extends Plugin { 'scrollme.zf.trigger': _this._updateActive.bind(_this) }).on('click.zf.magellan', 'a[href^="#"]', function(e) { e.preventDefault(); - var arrival = _this.getAttribute('href'); + var arrival = this.getAttribute('href'); _this.scrollToLoc(arrival); }); } else { @@ -109,7 +109,7 @@ class Magellan extends Plugin { 'scrollme.zf.trigger': _this._updateActive.bind(_this) }).on('click.zf.magellan', 'a[href^="#"]', function(e) { e.preventDefault(); - var arrival = _this.getAttribute('href'); + var arrival = this.getAttribute('href'); _this.scrollToLoc(arrival); }); });