Skip to content

Commit

Permalink
Remove usages of createObservableArray.getArray, see phetsims/axon#279
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Oct 12, 2020
1 parent c9151c2 commit 99874d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/model/Circuit.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,9 +873,8 @@ class Circuit {
this.timeProperty.value += dt;

// Update the
const circuitElementsArray = this.circuitElements.getArray();
const stepElements = circuitElementsArray.filter( element => element.step );
const dynamicElements = circuitElementsArray.filter( element => element instanceof DynamicCircuitElement );
const stepElements = this.circuitElements.filter( element => element.step );
const dynamicElements = this.circuitElements.filter( element => element instanceof DynamicCircuitElement );
stepElements.forEach( element => element.step( this.timeProperty.value, dt, this ) );

if ( this.dirty || stepElements.length > 0 || dynamicElements.length > 0 ) {
Expand Down

0 comments on commit 99874d6

Please sign in to comment.