Skip to content

Commit 2f89f35

Browse files
committed
Widget: Refactoring setOptions loop to remove unnesecary closure / that reference
1 parent 1d69181 commit 2f89f35

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ui/jquery.ui.widget.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,11 @@ $.Widget.prototype = {
270270
return this;
271271
},
272272
_setOptions: function( options ) {
273-
var that = this;
274-
$.each( options, function( key, value ) {
275-
that._setOption( key, value );
276-
});
273+
var key;
274+
275+
for ( key in options ) {
276+
this._setOption( key, options[ key ] );
277+
}
277278

278279
return this;
279280
},

0 commit comments

Comments
 (0)