From ef6cd36bb6407a3d245194d6edd49e5d47d748ad Mon Sep 17 00:00:00 2001 From: akodde Date: Tue, 10 Feb 2015 09:03:56 +0100 Subject: [PATCH] Change init order to fix deeptab deeplink TypeError --- js/foundation/foundation.tab.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/js/foundation/foundation.tab.js b/js/foundation/foundation.tab.js index 24e779a28..ea15e85ae 100644 --- a/js/foundation/foundation.tab.js +++ b/js/foundation/foundation.tab.js @@ -20,20 +20,19 @@ var self = this, S = this.S; - this.bindings(method, options); + // Store the default active tabs which will be referenced when the + // location hash is absent, as in the case of navigating the tabs and + // returning to the first viewing via the browser Back button. + S('[' + this.attr_name() + '] > .active > a', this.scope).each(function () { + self.default_tab_hashes.push(this.hash); + }); // store the initial href, which is used to allow correct behaviour of the // browser back button when deep linking is turned on. self.entry_location = window.location.href; + this.bindings(method, options); this.handle_location_hash_change(); - - // Store the default active tabs which will be referenced when the - // location hash is absent, as in the case of navigating the tabs and - // returning to the first viewing via the browser Back button. - S('[' + this.attr_name() + '] > .active > a', this.scope).each(function () { - self.default_tab_hashes.push(this.hash); - }); }, events : function () { -- 2.47.2