timeout on first collectIfNeeded

This commit is contained in:
Kyle Spearrin 2017-10-25 23:22:17 -04:00
parent 6896822863
commit f491515904
1 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,10 @@
chrome.storage.local.get('disableAddLoginNotification', function (obj) {
if (!obj || !obj.disableAddLoginNotification) {
collectIfNeeded();
if (collectIfNeededTimeout) {
clearTimeout(collectIfNeededTimeout);
}
collectIfNeededTimeout = setTimeout(collectIfNeeded, 1000);
}
});
});