aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widget.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2017-04-21 14:49:52 -0400
committerScott González <scott.gonzalez@gmail.com>2017-04-24 12:41:29 -0400
commitb3c0a7f71d0b351755b97858ad47de4e9a373606 (patch)
treeaa69ee7e6c9388007ee398978adf1f0bc2e175cd /ui/widget.js
parentef2e9bab92ae898311baa295590cd487d9071319 (diff)
downloadjquery-ui-b3c0a7f71d0b351755b97858ad47de4e9a373606.tar.gz
jquery-ui-b3c0a7f71d0b351755b97858ad47de4e9a373606.zip
Widget: Handle `Object.create(null)` for options objects
Fixes #15179 Closes gh-1809
Diffstat (limited to 'ui/widget.js')
-rw-r--r--ui/widget.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/widget.js b/ui/widget.js
index f87675712..011396811 100644
--- a/ui/widget.js
+++ b/ui/widget.js
@@ -26,6 +26,7 @@
}( function( $ ) {
var widgetUuid = 0;
+var widgetHasOwnProperty = Array.prototype.hasOwnProperty;
var widgetSlice = Array.prototype.slice;
$.cleanData = ( function( orig ) {
@@ -183,7 +184,7 @@ $.widget.extend = function( target ) {
for ( ; inputIndex < inputLength; inputIndex++ ) {
for ( key in input[ inputIndex ] ) {
value = input[ inputIndex ][ key ];
- if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
+ if ( widgetHasOwnProperty.call( input[ inputIndex ], key ) && value !== undefined ) {
// Clone objects
if ( $.isPlainObject( value ) ) {