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() {
9
9
}
10
10
11
11
const stopwatchEl = $ ( '.active-stopwatch-trigger' ) ;
12
+
13
+ if ( ! stopwatchEl . length ) {
14
+ return ;
15
+ }
16
+
12
17
stopwatchEl . removeAttr ( 'href' ) ; // intended for noscript mode only
13
18
stopwatchEl . popup ( {
14
19
position : 'bottom right' ,
@@ -20,10 +25,6 @@ export async function initStopwatch() {
20
25
$ ( this ) . parent ( ) . trigger ( 'submit' ) ;
21
26
} ) ;
22
27
23
- if ( ! stopwatchEl ) {
24
- return ;
25
- }
26
-
27
28
if ( NotificationSettings . EventSourceUpdateTime > 0 && ! ! window . EventSource && window . SharedWorker ) {
28
29
// Try to connect to the event source via the shared worker first
29
30
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