Improve handling empty variables (#1510)
This commit is contained in:
parent
822192dcbb
commit
96f86f766f
|
@ -34,7 +34,11 @@ optionsOther._renderIconSection = function (opt) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedIcon = opt.selectedIcon;
|
if (opt.selectedIcon === null || opt.selectedIcon === undefined) {
|
||||||
|
selectedIcon = 'Default';
|
||||||
|
} else {
|
||||||
|
selectedIcon = opt.selectedIcon;
|
||||||
|
}
|
||||||
|
|
||||||
if (selectedIcon === 'Default') {
|
if (selectedIcon === 'Default') {
|
||||||
document.getElementById('icon-default').checked = true;
|
document.getElementById('icon-default').checked = true;
|
||||||
|
|
|
@ -196,7 +196,7 @@ options._configureLinkPrefetching = function (value) {
|
||||||
};
|
};
|
||||||
|
|
||||||
options._serializeAllowlistedDomains = function (allowlistedDomains) {
|
options._serializeAllowlistedDomains = function (allowlistedDomains) {
|
||||||
if (allowlistedDomains === undefined) {
|
if (allowlistedDomains === undefined || allowlistedDomains === null) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -295,7 +295,9 @@ popup._determineStatusGoogleFonts = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
chrome.runtime.sendMessage(message, function (response) {
|
chrome.runtime.sendMessage(message, function (response) {
|
||||||
popup._domainGoogleFonts = response.value;
|
if (response !== undefined) {
|
||||||
|
popup._domainGoogleFonts = response.value;
|
||||||
|
}
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
<p>Improved</p>
|
<p>Improved</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Allow Google fonts for Google services by default and permanently (<a href="https://codeberg.org/nobody/LocalCDN/issues/1560">#1560</a>)</li>
|
<li>Allow Google fonts for Google services by default and permanently (<a href="https://codeberg.org/nobody/LocalCDN/issues/1560">#1560</a>)</li>
|
||||||
|
<li>Firefox Sync (<a href="https://codeberg.org/nobody/LocalCDN/issues/1510">#1510</a>)</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="generator-section">
|
<div id="generator-section">
|
||||||
|
|
Loading…
Reference in New Issue