Skip to content

Commit 0514e79

Browse files
Gustedwxiaoguang
andauthored
Apply code suggestion
Co-authored-by: wxiaoguang <[email protected]>
1 parent c771b8d commit 0514e79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

web_src/js/features/stopwatch.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ function updateStopwatchData(data) {
127127
const watch = data[0];
128128
const btnEl = $('.active-stopwatch-trigger');
129129
if (!watch) {
130-
clearInterval(updateTimeInterval);
130+
if (updateTimeInterval) {
131+
clearInterval(updateTimeInterval);
132+
updateTimeInterval = null;
133+
}
131134
btnEl.addClass('hidden');
132135
} else {
133136
const {repo_owner_name, repo_name, issue_index, seconds} = watch;

0 commit comments

Comments
 (0)