diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2015-12-23 10:49:27 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2015-12-30 08:58:04 +0100 |
commit | 49031e07443a18efb7246c005076c427b535e201 (patch) | |
tree | d52d5dc0c4e657e050a5d14a3ff75d42d418ab13 /core/js/sharedialogview.js | |
parent | f99fcd5dd6ccd0013016d8db068451e31385d3b1 (diff) | |
download | nextcloud-server-49031e07443a18efb7246c005076c427b535e201.tar.gz nextcloud-server-49031e07443a18efb7246c005076c427b535e201.zip |
Fix unit tests
Diffstat (limited to 'core/js/sharedialogview.js')
-rw-r--r-- | core/js/sharedialogview.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index c89c1d95be9..4cebf7962e8 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -129,7 +129,7 @@ $loading.addClass('hidden'); $loading.removeClass('inlineblock'); if (result.ocs.meta.statuscode == 100) { - var users = [].concat(result.ocs.data.exact.users).concat(result.ocs.data.users); + var users = result.ocs.data.exact.users.concat(result.ocs.data.users); var groups = result.ocs.data.exact.groups.concat(result.ocs.data.groups); var remotes = result.ocs.data.exact.remotes.concat(result.ocs.data.remotes); @@ -195,8 +195,12 @@ var suggestions = users.concat(groups).concat(remotes); - $('.shareWithField').autocomplete("option", "autoFocus", true); - response(suggestions); + if (suggestions.length > 0) { + $('.shareWithField').autocomplete("option", "autoFocus", true); + response(suggestions); + } else { + response(); + } } else { response(); } |