aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/unit/core/core.js20
-rw-r--r--ui/ui.core.js2
2 files changed, 18 insertions, 4 deletions
diff --git a/tests/unit/core/core.js b/tests/unit/core/core.js
index 232b95061..71f8c5845 100644
--- a/tests/unit/core/core.js
+++ b/tests/unit/core/core.js
@@ -65,17 +65,31 @@ test('widget factory, merge multiple option arguments', function() {
disabled: false,
option1: "value1",
option2: "value2",
- option3: "value3"
+ option3: "value3",
+ option4: {
+ option4a: "valuea",
+ option4b: "valueb"
+ }
});
}
});
$("#main > :first").widgetTest({
option1: "valuex",
option2: "valuex",
- option3: "value3"
+ option3: "value3",
+ option4: {
+ option4a: "valuex"
+ }
}, {
option1: "value1",
- option2: "value2"
+ option2: "value2",
+ option4: {
+ option4b: "valueb"
+ }
+ }, {
+ option4: {
+ option4a: "valuea"
+ }
});
});
diff --git a/ui/ui.core.js b/ui/ui.core.js
index 37f1f09e9..a83618a45 100644
--- a/ui/ui.core.js
+++ b/ui/ui.core.js
@@ -255,7 +255,7 @@ $.widget = function(name, prototype) {
// allow multiple hashes to be passed on init
options = !isMethodCall && args.length
- ? $.extend.apply(null, arguments)
+ ? $.extend.apply(null, [true, options].concat(args))
: options;
// prevent calls to internal methods