Skip to content
Permalink
Browse files

UI Tabs: allow initializing an empty list, fixes #3683

  • Loading branch information
Klaus Hartl
Klaus Hartl committed Jan 10, 2009
1 parent 71a97f2 commit db738053ca93dbc3e7f501d82952ca2704e8a2d8
Showing with 1 addition and 1 deletion.
  1. +1 −1 ui/ui.tabs.js
@@ -150,7 +150,7 @@ $.widget("ui.tabs", {
// highlight selected tab
this.$panels.addClass(o.hideClass);
this.$lis.removeClass(o.selectedClass);
if (o.selected !== null) {
if (o.selected !== null && this.$tabs.length) { // check for length avoids error when initializing empty list
this.$panels.eq(o.selected).removeClass(o.hideClass);
var classes = [o.selectedClass];
if (o.deselectable) classes.push(o.deselectableClass);

0 comments on commit db73805

Please sign in to comment.
You can’t perform that action at this time.