Explicitly compare refCount with 0

This commit is contained in:
Hornwitser committed 2026-03-17 23:21:56 +01:00
1 parent 0d28a3ac3c
commit 781b98b1c1
1 file changed
+2 -2
@@ -27,7 +27,7 @@ class DefaultModPackStore {
}
subscribe(control: Control, callback: () => void) {
if (!this.refCount) {
if (this.refCount === 0) {
const update = () => { this.fetchDefaultModPack(control); };
update();
this.interval = setInterval(update, 60e3);
@@ -37,7 +37,7 @@ class DefaultModPackStore {
return () => {
this.callbacks.splice(this.callbacks.indexOf(callback), 1);
this.refCount -= 1;
if (!this.refCount) {
if (this.refCount === 0) {
clearInterval(this.interval);
this.interval = undefined;
}