1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-06-05 21:49:31 +02:00

Fixed: Undefined variable in badge text (#301)

This commit is contained in:
nobody
2021-03-14 11:03:34 +01:00
parent 0866f56ddd
commit fe1e42bf0a
2 changed files with 3 additions and 12 deletions

View File

@ -85,15 +85,14 @@ interceptor._handleMissingCandidate = function (requestUrl, tabIdentifier) {
let requestUrlSegments, injectionCount, missingCount;
if (stateManager.showIconBadge === true) {
injectionCount = Object.keys(stateManager.tabs[tabIdentifier].injections).length || 0;
if (stateManager.changeBadgeColorMissingResources === true) {
missingCount = stateManager.tabs[tabIdentifier].missing || 0;
injectionCount = Object.keys(stateManager.tabs[tabIdentifier].injections).length || 0;
if (missingCount > 0 && injectionCount === 0) {
wrappers.setBadgeMissing(tabIdentifier, injectionCount);
}
} else {
wrappers.defaultBadge(tabIdentifier);
wrappers.defaultBadge(tabIdentifier, injectionCount);
}
}