fix locales versioning in backend client

This commit is contained in:
Hazelnoot 2024-10-15 21:32:03 -04:00
parent 9b06347882
commit 7431866d86
4 changed files with 27 additions and 57 deletions

View file

@ -88,7 +88,7 @@
const themeFontFaceName = 'sharkey-theme-font-face';
if (theme) {
let existingFontFace;
document.fonts.forEach((v,k,s)=>{if (v.family === themeFontFaceName) existingFontFace=v;});
document.fonts.forEach((v) => { if (v.family === themeFontFaceName) existingFontFace = v;});
if (existingFontFace) document.fonts.delete(existingFontFace);
const themeProps = JSON.parse(theme);
@ -102,9 +102,8 @@
document.fonts.add(fontFace);
fontFace.load().catch(
(failure) => {
console.log(failure)
}
);
console.log(failure);
}, );
}
for (const [k, v] of Object.entries(themeProps)) {
if (k.startsWith('font')) continue;