From 029decdd1d2941711f0d2d38454722480655de09 Mon Sep 17 00:00:00 2001 From: "g.chanaud" Date: Sun, 1 May 2016 13:04:34 +0200 Subject: [PATCH] [Bugfix] Sticky : Fixes #8393. anchor object undefined when destroying element with no anchors set --- js/foundation.sticky.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/foundation.sticky.js b/js/foundation.sticky.js index cfe356ffc..3836056ee 100644 --- a/js/foundation.sticky.js +++ b/js/foundation.sticky.js @@ -355,8 +355,9 @@ class Sticky { 'max-width': '' }) .off('resizeme.zf.trigger'); - - this.$anchor.off('change.zf.sticky'); + if (this.$anchor && this.$anchor.length) { + this.$anchor.off('change.zf.sticky'); + } $(window).off(this.scrollListener); if (this.wasWrapped) { -- 2.47.2