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 ce4e023 commit fe9a2b5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/building/model/BuildingModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ class BuildingModel {
// Check for duplicates (but only when assertions are enabled)
assert && this.activePiecesMap.forEach( ( activePieces, type ) => {
activePieces.addItemAddedListener( () => {
const array = activePieces.getArray();
assert( array.length === _.uniq( array ).length, `Duplicate items should not be added to active pieces for ${type}` );
assert( activePieces.length === _.uniq( activePieces ).length, `Duplicate items should not be added to active pieces for ${type}` );
} );
} );

Expand Down

0 comments on commit fe9a2b5

Please sign in to comment.