Fix timeago import and warning.

This commit is contained in:
FireMasterK
2022-01-12 05:39:36 +00:00
parent 983fdac95d
commit 9b1f7086f4
2 changed files with 4 additions and 4 deletions

View File

@@ -59,9 +59,9 @@ export default {
(async function () {
const locale = App.getPreferenceString("hl", App.defaultLangage);
if (locale !== App.TimeAgoConfig.locale) {
const localeTime = await import("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;
}