From e4ab0757d9ca4c0d35df59157f94dbed823df5bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Mon, 17 Aug 2015 20:01:43 +0200 Subject: [PATCH] collapsibleTabs: Don't mix Arrays and jQuery objects for one property We treat this as a jQuery object throughout the code, but it was initialized to an array. Bug: T109259 Change-Id: I44c10683ded05656eb7ca1b4be43ddc4f9281076 --- collapsibleTabs.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/collapsibleTabs.js b/collapsibleTabs.js index 6fd8c496b..da860ca10 100644 --- a/collapsibleTabs.js +++ b/collapsibleTabs.js @@ -14,8 +14,7 @@ this.each( function () { var $el = $( this ); // add the element to our array of collapsible managers - $.collapsibleTabs.instances = ( $.collapsibleTabs.instances.length === 0 ? - $el : $.collapsibleTabs.instances.add( $el ) ); + $.collapsibleTabs.instances = $.collapsibleTabs.instances.add( $el ); // attach the settings to the elements $el.data( 'collapsibleTabsSettings', settings ); // attach data to our collapsible elements @@ -37,7 +36,7 @@ return this; }; $.collapsibleTabs = { - instances: [], + instances: $( [] ), boundEvent: null, defaults: { expandedContainer: '#p-views ul',