File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,13 @@ export function initStopwatch() {
2525 $ ( this ) . parent ( ) . trigger ( 'submit' ) ;
2626 } ) ;
2727
28- // global stop watch (in the head_navbar), it should always work in any case either the EventSource or the TimerPoller is used.
28+ // global stop watch (in the head_navbar), it should always work in any case either the EventSource or the PeriodicPoller is used.
2929 const currSeconds = $ ( '.stopwatch-time' ) . attr ( 'data-seconds' ) ;
3030 if ( currSeconds ) {
3131 updateStopwatchTime ( currSeconds ) ;
3232 }
3333
3434 let usingPeriodicPoller = false ;
35- // poll the stopwatch status periodically
3635 const startPeriodicPoller = ( timeout ) => {
3736 if ( timeout <= 0 || ! Number . isFinite ( timeout ) ) return ;
3837 usingPeriodicPoller = true ;
@@ -149,9 +148,8 @@ function clearStopwatchTimer() {
149148}
150149function updateStopwatchTime ( seconds ) {
151150 const secs = parseInt ( seconds ) ;
152- if ( ! Number . isFinite ( secs ) ) {
153- return ;
154- }
151+ if ( ! Number . isFinite ( secs ) ) return ;
152+
155153 clearStopwatchTimer ( ) ;
156154 const $stopwatch = $ ( '.stopwatch-time' ) ;
157155 const start = Date . now ( ) ;
You can’t perform that action at this time.
0 commit comments