Skip to content

Commit

Permalink
Revert "move documentation about updating timeInQueue to its line, see
Browse files Browse the repository at this point in the history
…#20"

This reverts commit 31a21b2.
  • Loading branch information
jessegreenberg committed Mar 12, 2022
1 parent 31a21b2 commit 01923e5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/UtteranceQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,11 @@ class UtteranceQueue extends PhetioObject {
}
}

// This side effect is to make sure that the timeInQueue is transferred between adding the same Utterance.
if ( times.length >= 1 ) {
utteranceWrapper.timeInQueue = Math.max( ...times );
}

// remove all occurrences, if applicable.
// remove all occurrences, if applicable. This side effect is to make sure that the timeInQueue is transferred between adding the same Utterance.
const removedWrappers = _.remove( this.queue, currentUtteranceWrapper => currentUtteranceWrapper.utterance === utteranceWrapper.utterance );
this.removePriorityListeners( removedWrappers );
}
Expand Down

0 comments on commit 01923e5

Please sign in to comment.