fix(web) fix test (#1059)

This commit is contained in:
Alex 2022-12-04 22:51:22 -06:00 committed by GitHub
parent 5d140145c1
commit 966d99217a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 35 additions and 17 deletions

View file

@ -39,7 +39,7 @@ export function getBytesWithUnit(bytes: number, maxPrecision = 1): [number, stri
* @returns localized bytes with unit as string
*/
export function asByteUnitString(bytes: number, maxPrecision = 1): string {
const locale = Array.from(navigator.languages);
const locale = Array.from(navigator.language);
const [size, unit] = getBytesWithUnit(bytes, maxPrecision);
return `${size.toLocaleString(locale)} ${unit}`;
}