diff options
author | crupest <crupest@outlook.com> | 2022-03-09 16:36:35 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-03-09 16:36:35 +0800 |
commit | ff046d001ba7b9ab784d2aa1a917536c56f23f8c (patch) | |
tree | 847291747cf353a194e36c0307458c1eccdd663d /FrontEnd/src/i18n.ts | |
parent | 57351c27346d804b5b9c354da10961ca4fe9a88a (diff) | |
download | timeline-ff046d001ba7b9ab784d2aa1a917536c56f23f8c.tar.gz timeline-ff046d001ba7b9ab784d2aa1a917536c56f23f8c.tar.bz2 timeline-ff046d001ba7b9ab784d2aa1a917536c56f23f8c.zip |
Fix errors for eslint new rule.
Diffstat (limited to 'FrontEnd/src/i18n.ts')
-rw-r--r-- | FrontEnd/src/i18n.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/FrontEnd/src/i18n.ts b/FrontEnd/src/i18n.ts index 5f71c7ea..6a38e5b4 100644 --- a/FrontEnd/src/i18n.ts +++ b/FrontEnd/src/i18n.ts @@ -4,7 +4,7 @@ import { initReactI18next } from "react-i18next"; const backend: BackendModule = { type: "backend", - async read(language, namespace, callback) { + read(language, namespace, callback) { function error(message: string): void { callback(new Error(message), false); } @@ -36,7 +36,7 @@ const backend: BackendModule = { })(); if (promise) { - success((await promise).default); + void promise.then((d) => success(d.default)); } }, init() {}, // eslint-disable-line @typescript-eslint/no-empty-function |