mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-26 17:17:31 +09:00
Revert "[HACKFIX] workaround for getting 'Error: No such property on self-hosted object: "get format"' after intl updates"
This reverts commit 6917ca052b.
This commit is contained in:
parent
6917ca052b
commit
3fd288e3ad
1 changed files with 7 additions and 9 deletions
|
|
@ -497,16 +497,14 @@ this.DownloadUtils = {
|
||||||
// Don't try to format Infinity values using NumberFormat.
|
// Don't try to format Infinity values using NumberFormat.
|
||||||
if (aBytes === Infinity) {
|
if (aBytes === Infinity) {
|
||||||
aBytes = "Infinity";
|
aBytes = "Infinity";
|
||||||
|
} else if (typeof Intl != "undefined") {
|
||||||
|
aBytes = getLocaleNumberFormat(fractionDigits)
|
||||||
|
.format(aBytes);
|
||||||
} else {
|
} else {
|
||||||
try {
|
// FIXME: Fall back to the old hack, will be fixed in bug 1200494.
|
||||||
aBytes = getLocaleNumberFormat(fractionDigits)
|
aBytes = aBytes.toFixed(fractionDigits);
|
||||||
.format(aBytes);
|
if (gDecimalSymbol != ".") {
|
||||||
} catch(e) {
|
aBytes = aBytes.replace(".", gDecimalSymbol);
|
||||||
// FIXME: Fall back to the old hack, will be fixed in bug 1200494.
|
|
||||||
aBytes = aBytes.toFixed(fractionDigits);
|
|
||||||
if (gDecimalSymbol != ".") {
|
|
||||||
aBytes = aBytes.replace(".", gDecimalSymbol);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue