File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ export async function initStopwatch() {
99 }
1010
1111 const stopwatchEl = $ ( '.active-stopwatch-trigger' ) ;
12+
13+ if ( ! stopwatchEl . length ) {
14+ return ;
15+ }
16+
1217 stopwatchEl . removeAttr ( 'href' ) ; // intended for noscript mode only
1318 stopwatchEl . popup ( {
1419 position : 'bottom right' ,
@@ -20,10 +25,6 @@ export async function initStopwatch() {
2025 $ ( this ) . parent ( ) . trigger ( 'submit' ) ;
2126 } ) ;
2227
23- if ( ! stopwatchEl ) {
24- return ;
25- }
26-
2728 if ( NotificationSettings . EventSourceUpdateTime > 0 && ! ! window . EventSource && window . SharedWorker ) {
2829 // Try to connect to the event source via the shared worker first
2930 const worker = new SharedWorker ( `${ __webpack_public_path__ } js/eventsource.sharedworker.js` , 'notification-worker' ) ;
You can’t perform that action at this time.
0 commit comments