Skip to content
Permalink
Browse files

Progressbar: Do not duplicate base _setOptions method

  • Loading branch information...
kborchers committed Nov 11, 2012
1 parent d6c6b7d commit 11687e44dc311746f3776f86dff6a6f68c573c8c
Showing with 4 additions and 10 deletions.
  1. +4 −10 ui/jquery.ui.progressbar.js
@@ -79,16 +79,10 @@ $.widget( "ui.progressbar", {
},

_setOptions: function( options ) {
var key, val;

for ( key in options ) {
if ( key === "value" ) {
// Store value to update last in case max is being updated at the same time
val = options[ key ];
} else {
this._setOption( key, options[ key ] );
}
}
var val = options.value;

delete options.value;
this._super( options );

if ( val !== undefined ) {
this._setOption( "value", val );

1 comment on commit 11687e4

@gnarf

This comment has been minimized.

Copy link
Member

gnarf commented on 11687e4 Nov 11, 2012

Perhaps this comment might help a future maintainer of this - in case it's not immediately apparent why you'd delete the option then set it after.

// Ensure "value" option is set after other values (like max)
Please sign in to comment.
You can’t perform that action at this time.