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