SDA-4197 - Clear existing interval if auto update is disabled (#2108)

This commit is contained in:
Kiran Niranjan authored and GitHub committed 2024-03-12 11:43:11 +05:30
1 parent 3942361010
commit cbf489f694
1 file changed
+5
+5
View File
@@ -1193,6 +1193,11 @@ export const updateFeaturesForCloudConfig = async (
}
}, getRandomTime(MIN_AUTO_UPDATE_CHECK_INTERVAL, MAX_AUTO_UPDATE_CHECK_INTERVAL));
}
} else {
// Clear the interval if autoUpdate is disabled
if (autoUpdateIntervalId) {
clearInterval(autoUpdateCheckInterval);
}
}
};