We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c6a48a commit 79b9200Copy full SHA for 79b9200
src/app/core/setting/components/upload-store.tsx
@@ -78,9 +78,9 @@ export default function UploadStore() {
78
if (file) {
79
const configJson = decodeBase64ToString(file.content)
80
const store = await Store.load('store.json');
81
- Object.keys(JSON.parse(configJson)).forEach(key => {
82
- store.set(key, JSON.parse(configJson)[key])
83
- })
+ const keys = Object.keys(JSON.parse(configJson))
+ await Promise.allSettled(keys.map(async key => await store.set(key, JSON.parse(configJson)[key])))
+ await store.save()
84
if (isMobileDevice()) {
85
toast({
86
description: t('downloadSuccess'),
0 commit comments