From 0f9b9fe1b750cd9917831569c2494854f0af0228 Mon Sep 17 00:00:00 2001 From: Klaus Hartl Date: Sun, 22 Feb 2009 12:11:44 +0000 Subject: [PATCH] Tabs: avoid !0 == true --- ui/ui.tabs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/ui.tabs.js b/ui/ui.tabs.js index 26d4c2ad3..4a6c5c31d 100644 --- a/ui/ui.tabs.js +++ b/ui/ui.tabs.js @@ -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; -- 2.39.5