Fix interval bug
Browse files- src/routes/+page.svelte +5 -0
src/routes/+page.svelte
CHANGED
@@ -145,6 +145,11 @@
|
|
145 |
if (controlsEl) {
|
146 |
controlsEl.appendChild(div);
|
147 |
isOutputControlAdded = true;
|
|
|
|
|
|
|
|
|
|
|
148 |
}
|
149 |
}
|
150 |
|
|
|
145 |
if (controlsEl) {
|
146 |
controlsEl.appendChild(div);
|
147 |
isOutputControlAdded = true;
|
148 |
+
(controlsEl as HTMLElement).onclick = () => {
|
149 |
+
if (interval) {
|
150 |
+
clearInterval(interval);
|
151 |
+
}
|
152 |
+
}
|
153 |
}
|
154 |
}
|
155 |
|