]> source.dussan.org Git - jquery-ui.git/commitdiff
Widget: Refactoring setOptions loop to remove unnesecary closure / that reference
authorCorey Frang <gnarf@gnarf.net>
Wed, 19 Oct 2011 17:54:08 +0000 (12:54 -0500)
committerCorey Frang <gnarf@gnarf.net>
Wed, 19 Oct 2011 17:54:08 +0000 (12:54 -0500)
ui/jquery.ui.widget.js

index 31328a45564383cb35133d39b56f2d855b8ef17b..b78530dca1780a8827830c37112b7bc3a760adb0 100644 (file)
@@ -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;
        },