Skip to content

Commit afaa035

Browse files
committed
Core: Better detection of when core is loaded twice. Fixes #5636 - Load ui.position before ui.core couse ui.core not execute.
1 parent fc093e9 commit afaa035

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

ui/jquery.ui.core.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,19 @@
77
*
88
* http://docs.jquery.com/UI
99
*/
10-
;jQuery.ui || (function($) {
10+
11+
(function($) {
12+
13+
// prevent duplicate loading
14+
// this is only a problem because we proxy existing functions
15+
// and we don't want to double proxy them
16+
$.ui = $.ui || {};
17+
if ($.ui.version) {
18+
return;
19+
}
1120

1221
//Helper functions and ui object
13-
$.ui = {
22+
$.extend($.ui, {
1423
version: "@VERSION",
1524

1625
// $.ui.plugin is deprecated. Use the proxy pattern instead.
@@ -103,7 +112,7 @@ $.ui = {
103112
UP: 38,
104113
WINDOWS: 91 // COMMAND
105114
}
106-
};
115+
});
107116

108117
//jQuery plugins
109118
$.fn.extend({

0 commit comments

Comments
 (0)