Skip to content

Commit 21a25c1

Browse files
committed
Fixed bugs in the storage dialog
1 parent bb1c026 commit 21a25c1

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

client/public/assets/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@
138138
"json": "JSON",
139139
"import_tests": "Import tests",
140140
"tests_imported": "The tests have been imported",
141-
"import_error": "An error occurred while importing the tests",
141+
"import_test_error": "An error occurred while importing the tests",
142+
"import_config_error": "An error occurred while importing the configuration",
142143
"export": "Export",
143144
"import": "Import",
144145
"clear_history": "Clear history",

client/src/common/components/StorageDialog/tabs/Configuration.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default () => {
3737
updateConfig();
3838
close();
3939
} else {
40-
updateToast(t("storage.import_error"), "red");
40+
updateToast(t("storage.import_config_error"), "red");
4141
}
4242
});
4343
}

client/src/common/components/StorageDialog/tabs/Speedtests.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default ({tests}) => {
5050
updateToast(t("storage.tests_imported"), "green", faFileImport);
5151
updateTests();
5252
} else {
53-
updateToast(t("storage.import_error"), "red");
53+
updateToast(t("storage.import_test_error"), "red");
5454
}
5555
close();
5656
});

server/controller/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ module.exports.exportConfig = async () => {
124124
module.exports.importConfig = async (obj) => {
125125
let configValues = obj.config;
126126
for (let key in configValues) {
127-
if (configDefaults[key] === undefined) return false;
127+
if (configDefaults[key] === undefined) continue
128128
if (key === "password") continue;
129129

130130
const validate = await this.validateInput(key, configValues[key]);

0 commit comments

Comments
 (0)