diff --git a/src/entities/synchronization/synchronization.ts b/src/entities/synchronization/synchronization.ts index 6c8094ae..2771955a 100644 --- a/src/entities/synchronization/synchronization.ts +++ b/src/entities/synchronization/synchronization.ts @@ -20,17 +20,17 @@ export class Synchronization implements TSynchronization { constructor(synchronization: TSynchronization) { this.id = synchronization.id || '' this.name = synchronization.name || '' - this.description = synchronization.description || null - this.sourceId = synchronization.sourceId || null - this.sourceType = synchronization.sourceType || null - this.sourceHash = synchronization.sourceHash || null - this.sourceTargetMapping = synchronization.sourceTargetMapping || null - this.sourceConfig = synchronization.sourceConfig || null - this.targetId = synchronization.targetId || null - this.targetType = synchronization.targetType || null - this.targetHash = synchronization.targetHash || null - this.targetSourceMapping = synchronization.targetSourceMapping || null - this.targetConfig = synchronization.targetConfig || null + this.description = synchronization.description || '' + this.sourceId = synchronization.sourceId || '' + this.sourceType = synchronization.sourceType || '' + this.sourceHash = synchronization.sourceHash || '' + this.sourceTargetMapping = synchronization.sourceTargetMapping || '' + this.sourceConfig = synchronization.sourceConfig || {} + this.targetId = synchronization.targetId || '' + this.targetType = synchronization.targetType || '' + this.targetHash = synchronization.targetHash || '' + this.targetSourceMapping = synchronization.targetSourceMapping || '' + this.targetConfig = synchronization.targetConfig || {} } diff --git a/src/store/modules/endpoints.js b/src/store/modules/endpoints.js index 69b7b203..88109adb 100644 --- a/src/store/modules/endpoints.js +++ b/src/store/modules/endpoints.js @@ -97,7 +97,7 @@ export const useEndpointStore = defineStore( // Create a copy of the endpoint item and remove empty properties const endpointToSave = { ...this.endpointItem } Object.keys(endpointToSave).forEach(key => { - if (endpointToSave[key] === '' || (Array.isArray(endpointToSave[key]) && endpointToSave[key].length === 0)) { + if (endpointToSave[key] === '' || (Array.isArray(endpointToSave[key]) && !endpointToSave[key].length)) { delete endpointToSave[key] } }) diff --git a/src/store/modules/job.js b/src/store/modules/job.js index 4902b3bd..546b94ee 100644 --- a/src/store/modules/job.js +++ b/src/store/modules/job.js @@ -162,7 +162,7 @@ export const useJobStore = defineStore( // Create a copy of the job item and remove empty properties const jobToSave = { ...jobItem } Object.keys(jobToSave).forEach(key => { - if (jobToSave[key] === '' || (Array.isArray(jobToSave[key]) && jobToSave[key].length === 0) || key === 'created' || key === 'updated') { + if (jobToSave[key] === '' || (Array.isArray(jobToSave[key]) && !jobToSave[key].length) || key === 'created' || key === 'updated') { delete jobToSave[key] } }) diff --git a/src/store/modules/log.js b/src/store/modules/log.js index fc3603b1..4e5d0a45 100644 --- a/src/store/modules/log.js +++ b/src/store/modules/log.js @@ -97,7 +97,7 @@ export const useLogStore = defineStore( // Create a copy of the log item and remove empty properties const logToSave = { ...this.logItem } Object.keys(logToSave).forEach(key => { - if (logToSave[key] === '' || (Array.isArray(logToSave[key]) && logToSave[key].length === 0)) { + if (logToSave[key] === '' || (Array.isArray(logToSave[key]) && !logToSave[key].length)) { delete logToSave[key] } }) diff --git a/src/store/modules/mapping.js b/src/store/modules/mapping.js index b00c267a..f4b7cb06 100644 --- a/src/store/modules/mapping.js +++ b/src/store/modules/mapping.js @@ -97,7 +97,7 @@ export const useMappingStore = defineStore( // Create a copy of the mapping item and remove empty properties const mappingToSave = { ...this.mappingItem } Object.keys(mappingToSave).forEach(key => { - if (mappingToSave[key] === '' || (Array.isArray(mappingToSave[key]) && mappingToSave[key].length === 0)) { + if (mappingToSave[key] === '' || (Array.isArray(mappingToSave[key]) && !mappingToSave[key].length)) { delete mappingToSave[key] } }) diff --git a/src/store/modules/source.js b/src/store/modules/source.js index 115baa2a..4a7b7c54 100644 --- a/src/store/modules/source.js +++ b/src/store/modules/source.js @@ -165,7 +165,7 @@ export const useSourceStore = defineStore( // Create a copy of the source item and remove empty properties const sourceToSave = { ...sourceItem } Object.keys(sourceToSave).forEach(key => { - if (sourceToSave[key] === '' || (Array.isArray(sourceToSave[key]) && sourceToSave[key].length === 0)) { + if (sourceToSave[key] === '' || (Array.isArray(sourceToSave[key]) && !sourceToSave[key].length)) { delete sourceToSave[key] } }) diff --git a/src/store/modules/webhooks.js b/src/store/modules/webhooks.js index 866915d7..3ce9c523 100644 --- a/src/store/modules/webhooks.js +++ b/src/store/modules/webhooks.js @@ -97,7 +97,7 @@ export const useWebhookStore = defineStore( // Create a copy of the webhook item and remove empty properties const webhookToSave = { ...this.webhookItem } Object.keys(webhookToSave).forEach(key => { - if (webhookToSave[key] === '' || (Array.isArray(webhookToSave[key]) && webhookToSave[key].length === 0)) { + if (webhookToSave[key] === '' || (Array.isArray(webhookToSave[key]) && !webhookToSave[key].length)) { delete webhookToSave[key] } }) diff --git a/src/views/Endpoint/EndpointsList.vue b/src/views/Endpoint/EndpointsList.vue index 74ba802f..8af418aa 100644 --- a/src/views/Endpoint/EndpointsList.vue +++ b/src/views/Endpoint/EndpointsList.vue @@ -69,7 +69,7 @@ import { endpointStore, navigationStore, searchStore } from '../../store/store.j appearance="dark" name="Endpoints aan het laden" /> -