From 2f89f356433d83a56135070c2f7d3b188c756b5a Mon Sep 17 00:00:00 2001 From: Corey Frang Date: Wed, 19 Oct 2011 12:54:08 -0500 Subject: [PATCH] Widget: Refactoring setOptions loop to remove unnesecary closure / that reference --- ui/jquery.ui.widget.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 31328a455..b78530dca 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -270,10 +270,11 @@ $.Widget.prototype = { return this; }, _setOptions: function( options ) { - var that = this; - $.each( options, function( key, value ) { - that._setOption( key, value ); - }); + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } return this; }, -- 2.39.5