Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:zap: Improved validation warnings in JSON editor

Alicia Sykese472d9110247
diff --git a/src/components/Configuration/JsonEditor.vue b/src/components/Configuration/JsonEditor.vue
index 1ec4cfd6..cb530066 100644
--- a/src/components/Configuration/JsonEditor.vue
+++ b/src/components/Configuration/JsonEditor.vue
@@ -193,12 +193,13 @@ export default {
validationErrors(errors) {
const errorMessages = [];
errors.forEach((error) => {
+ console.log(error);
switch (error.type) {
case 'validation':
errorMessages.push({
type: 'validation',
msg: `${this.$t('config-editor.warning-msg-validation')}: `
- + `${error.error.keyword} ${error.error.message}`,
+ + `${(error.error || error).dataPath} ${(error.error || error).message}`,
});
break;
case 'error':