Skip to content

Commit

Permalink
Slight improvement of code, see #327
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinVallejo committed Jan 5, 2024
1 parent 4a70c3a commit 348628c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions js/common/model/MySolarSystemModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,10 @@ export default class MySolarSystemModel extends SolarSystemCommonModel {
} );

// Saving starting body info when phetioState is finished being set (turned false after being true)
let wasSettingPhetioState = false;
isSettingPhetioStateProperty.lazyLink( isSettingPhetioState => {
isSettingPhetioStateProperty.lazyLink( ( isSettingPhetioState, wasSettingPhetioState ) => {
if ( !isSettingPhetioState && wasSettingPhetioState ) {
this.saveStartingBodyInfo();
}
wasSettingPhetioState = isSettingPhetioState;
} );

}
Expand Down

0 comments on commit 348628c

Please sign in to comment.