Skip to content

Commit

Permalink
Assert that there is at least one dependency for phetsims/scenery#1300
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Apr 12, 2022
1 parent de69981 commit 2fbfaba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/Utterance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ class Utterance {
* this.canAnnounceProperty.
*/
public setCanAnnounceProperties( canAnnounceProperties: IProperty<boolean>[] ): void {
assert && assert( canAnnounceProperties.length > 0, 'There must be at least once dependency canAnnounceProperty' );

if ( this.canAnnounceImplementationProperty.value ) {
this.canAnnounceImplementationProperty.value.dispose();
Expand Down

0 comments on commit 2fbfaba

Please sign in to comment.