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
This commit is contained in:
Bartosz Dziewoński 2015-08-17 20:01:43 +02:00
parent 82d7a370f2
commit e4ab0757d9

View file

@ -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',