Tabs: avoid !0 == true

This commit is contained in:
Klaus Hartl 2009-02-22 12:11:44 +00:00
parent 66761ebe9a
commit 0f9b9fe1b7

View File

@ -145,10 +145,10 @@ $.widget("ui.tabs", {
}
});
}
if (!o.selected && o.cookie) {
if (typeof o.selected != 'number' && o.cookie) {
o.selected = parseInt(self._cookie(), 10);
}
if (!o.selected && this.$lis.filter('.ui-tabs-selected').length) {
if (typeof o.selected != 'number' && this.$lis.filter('.ui-tabs-selected').length) {
o.selected = this.$lis.index(this.$lis.filter('.ui-tabs-selected'));
}
o.selected = o.selected || 0;