Skip to content

Commit fcbf4c0

Browse files
committed
Tabs: Removed instances of " .. + (++ .." to avoid a minification bug in closure compiler. Fixes #5576 - invalid increment operand.
1 parent bf67347 commit fcbf4c0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ui/jquery.ui.tabs.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
var tabId = 0,
1717
listId = 0;
1818

19+
function getNextTabId() {
20+
return ++tabId;
21+
}
22+
23+
function getNextListId() {
24+
return ++listId;
25+
}
26+
1927
$.widget("ui.tabs", {
2028
options: {
2129
add: null,
@@ -56,15 +64,15 @@ $.widget("ui.tabs", {
5664

5765
_tabId: function(a) {
5866
return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '') ||
59-
this.options.idPrefix + (++tabId);
67+
this.options.idPrefix + getNextTabId();
6068
},
6169

6270
_sanitizeSelector: function(hash) {
6371
return hash.replace(/:/g, '\\:'); // we need this because an id may contain a ":"
6472
},
6573

6674
_cookie: function() {
67-
var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + (++listId));
75+
var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + getNextListId());
6876
return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
6977
},
7078

0 commit comments

Comments
 (0)