From 01923e56d04793408934ab560ff98b01eb1aeefb Mon Sep 17 00:00:00 2001 From: Jesse Date: Sat, 12 Mar 2022 17:55:25 -0500 Subject: [PATCH] Revert "move documentation about updating timeInQueue to its line, see #20" This reverts commit 31a21b27268c39850faec491552b1b50b14f48f8. --- js/UtteranceQueue.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/UtteranceQueue.ts b/js/UtteranceQueue.ts index ce8ae4b..4c02503 100644 --- a/js/UtteranceQueue.ts +++ b/js/UtteranceQueue.ts @@ -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 ); }