We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16dea6c commit c9a3c26Copy full SHA for c9a3c26
web_src/js/features/stopwatch.js
@@ -9,6 +9,11 @@ export async function initStopwatch() {
9
}
10
11
const stopwatchEl = $('.active-stopwatch-trigger');
12
+
13
+ if (!stopwatchEl.length) {
14
+ return;
15
+ }
16
17
stopwatchEl.removeAttr('href'); // intended for noscript mode only
18
stopwatchEl.popup({
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;
- }
-
28
if (NotificationSettings.EventSourceUpdateTime > 0 && !!window.EventSource && window.SharedWorker) {
29
// Try to connect to the event source via the shared worker first
30
const worker = new SharedWorker(`${__webpack_public_path__}js/eventsource.sharedworker.js`, 'notification-worker');
0 commit comments