mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Fix vite from complaining about import analysis.
This commit is contained in:
parent
b5b238656b
commit
ce48bd55f1
2 changed files with 4 additions and 4 deletions
|
@ -63,9 +63,9 @@ export default {
|
|||
const defaultLang = await App.defaultLangage;
|
||||
const locale = App.getPreferenceString("hl", defaultLang);
|
||||
if (locale !== App.TimeAgoConfig.locale) {
|
||||
const localeTime = await import(
|
||||
"./../node_modules/javascript-time-ago/locale/" + locale + ".json"
|
||||
).then(module => module.default);
|
||||
const localeTime = await import(`../node_modules/javascript-time-ago/locale/${locale}.json`).then(
|
||||
module => module.default,
|
||||
);
|
||||
App.TimeAgo.addLocale(localeTime);
|
||||
App.TimeAgoConfig.locale = locale;
|
||||
}
|
||||
|
|
|
@ -253,7 +253,7 @@ const mixin = {
|
|||
const languages = window.navigator.languages;
|
||||
for (let i = 0; i < languages.length; i++) {
|
||||
try {
|
||||
await import("./locales/" + languages[i] + ".json");
|
||||
await import(`./locales/${languages[i]}.json`);
|
||||
return languages[i];
|
||||
} catch {
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue