mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-28 18:17:29 +09:00
Replace unsupported null default values with an empty string.
Fixes #1028
This commit is contained in:
parent
c3a58ab50b
commit
62c5f20b77
1 changed files with 6 additions and 9 deletions
|
|
@ -2038,7 +2038,7 @@ UpdateService.prototype = {
|
||||||
if (getElevationRequired()) {
|
if (getElevationRequired()) {
|
||||||
let installAttemptVersion = Services.prefs.getCharPref(
|
let installAttemptVersion = Services.prefs.getCharPref(
|
||||||
PREF_APP_UPDATE_ELEVATE_VERSION,
|
PREF_APP_UPDATE_ELEVATE_VERSION,
|
||||||
null);
|
"");
|
||||||
if (vc.compare(installAttemptVersion, update.appVersion) != 0) {
|
if (vc.compare(installAttemptVersion, update.appVersion) != 0) {
|
||||||
Services.prefs.setCharPref(PREF_APP_UPDATE_ELEVATE_VERSION,
|
Services.prefs.setCharPref(PREF_APP_UPDATE_ELEVATE_VERSION,
|
||||||
update.appVersion);
|
update.appVersion);
|
||||||
|
|
@ -2708,7 +2708,7 @@ UpdateManager.prototype = {
|
||||||
Services.obs.notifyObservers(null, "update-staged", update.state);
|
Services.obs.notifyObservers(null, "update-staged", update.state);
|
||||||
|
|
||||||
// Only prompt when the UI isn't already open.
|
// Only prompt when the UI isn't already open.
|
||||||
let windowType = Services.prefs.getCharPref(PREF_APP_UPDATE_ALTWINDOWTYPE, null);
|
let windowType = Services.prefs.getCharPref(PREF_APP_UPDATE_ALTWINDOWTYPE, "");
|
||||||
if (Services.wm.getMostRecentWindow(UPDATE_WINDOW_NAME) ||
|
if (Services.wm.getMostRecentWindow(UPDATE_WINDOW_NAME) ||
|
||||||
windowType && Services.wm.getMostRecentWindow(windowType)) {
|
windowType && Services.wm.getMostRecentWindow(windowType)) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -2788,15 +2788,12 @@ Checker.prototype = {
|
||||||
this._forced = force;
|
this._forced = force;
|
||||||
|
|
||||||
// Use the override URL if specified.
|
// Use the override URL if specified.
|
||||||
let url = Services.prefs.getCharPref(PREF_APP_UPDATE_URL_OVERRIDE, null);
|
let url = Services.prefs.getCharPref(PREF_APP_UPDATE_URL_OVERRIDE, "");
|
||||||
|
|
||||||
// Otherwise, construct the update URL from component parts.
|
// Otherwise, construct the update URL from component parts.
|
||||||
if (!url) {
|
if (!url) {
|
||||||
try {
|
|
||||||
url = Services.prefs.getDefaultBranch(null).
|
url = Services.prefs.getDefaultBranch(null).
|
||||||
getCharPref(PREF_APP_UPDATE_URL);
|
getCharPref(PREF_APP_UPDATE_URL, "");
|
||||||
} catch (e) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!url || url == "") {
|
if (!url || url == "") {
|
||||||
|
|
@ -3839,7 +3836,7 @@ UpdatePrompt.prototype = {
|
||||||
* application update user interface window.
|
* application update user interface window.
|
||||||
*/
|
*/
|
||||||
_getAltUpdateWindow: function UP__getAltUpdateWindow() {
|
_getAltUpdateWindow: function UP__getAltUpdateWindow() {
|
||||||
let windowType = Services.prefs.getCharPref(PREF_APP_UPDATE_ALTWINDOWTYPE, null);
|
let windowType = Services.prefs.getCharPref(PREF_APP_UPDATE_ALTWINDOWTYPE, "");
|
||||||
if (!windowType)
|
if (!windowType)
|
||||||
return null;
|
return null;
|
||||||
return Services.wm.getMostRecentWindow(windowType);
|
return Services.wm.getMostRecentWindow(windowType);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue