summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannik Schönartz2021-06-24 14:18:34 +0200
committerJannik Schönartz2021-06-24 14:18:34 +0200
commitbc4517d9baa0820dde6665e9faa14a4ee8fcde5c (patch)
treeed0545130d081777d1d9b50e0cb8cc145e85084f
parent[server/registration/idoit] Rework to new hw-collection method + restruce of ... (diff)
downloadbas-bc4517d9baa0820dde6665e9faa14a4ee8fcde5c.tar.gz
bas-bc4517d9baa0820dde6665e9faa14a4ee8fcde5c.tar.xz
bas-bc4517d9baa0820dde6665e9faa14a4ee8fcde5c.zip
[server/external-backends/idoit] Small undefined read fix
-rw-r--r--server/lib/external-backends/backends/idoit-backend.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/lib/external-backends/backends/idoit-backend.js b/server/lib/external-backends/backends/idoit-backend.js
index 0a8b164..1c328ec 100644
--- a/server/lib/external-backends/backends/idoit-backend.js
+++ b/server/lib/external-backends/backends/idoit-backend.js
@@ -355,7 +355,7 @@ class IdoitBackend extends ExternalBackends {
const boundObjects = await this.axiosRequest(c.url, getObjectsBodies, headers)
// Add contact assignment to the object.
- if (client.contacts) {
+ if (client.contacts && client.contacts.length > 0) {
// Get the persons ids.
const persons = boundObjects.filter(response => response.id.startsWith('READ_C__OBJTYPE__PERSON'))[0].result
let counter = 0