Skip to content

Commit

Permalink
Simplified _.extend call and clarified assert messages, see #243
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jul 6, 2016
1 parent 7c1cb4a commit 0d6b589
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/buttons/StepBackwardButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ define( function( require ) {
* @constructor
*/
function StepBackwardButton( options ) {
assert && assert( !options.direction, 'options.direction must not be specified for StepBackwardButton' );
StepButton.call( this, _.extend( {}, options, { direction: 'backward' } ) );
assert && assert( !options.direction, 'options.direction must be omitted for StepBackwardButton' );
StepButton.call( this, _.extend( { direction: 'backward' }, options ) );
}

sceneryPhet.register( 'StepBackwardButton', StepBackwardButton );
Expand Down
4 changes: 2 additions & 2 deletions js/buttons/StepForwardButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ define( function( require ) {
* @constructor
*/
function StepForwardButton( options ) {
assert && assert( !options.direction, 'options.direction must not be specified for StepForwardButton' );
StepButton.call( this, _.extend( {}, options, { direction: 'forward' } ) );
assert && assert( !options.direction, 'options.direction must be omitted for StepForwardButton' );
StepButton.call( this, _.extend( { direction: 'forward' }, options ) );
}

sceneryPhet.register( 'StepForwardButton', StepForwardButton );
Expand Down

0 comments on commit 0d6b589

Please sign in to comment.