Merge pull request #853 from shapeblue/fix-ldap

addldapaccount: Fix defensive check
diff --git a/src/views/iam/AddLdapAccount.vue b/src/views/iam/AddLdapAccount.vue
index feb244e..50806d1 100644
--- a/src/views/iam/AddLdapAccount.vue
+++ b/src/views/iam/AddLdapAccount.vue
@@ -283,7 +283,7 @@
       params.domainid = store.getters.userInfo.domainid
       if (domain) {
         const result = this.listDomains.filter(item => item.name === domain)
-        if (result) {
+        if (result.length > 0) {
           params.domainid = result[0].id
         }
       }