diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-11-21 11:29:42 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-11-23 13:32:13 +0100 |
commit | 9d95391ff14a1c753e8fda4ecaacc007572552f4 (patch) | |
tree | e6ebac228b44b83fbfa10645cd9bbe88214c1d54 /core/js/share.js | |
parent | 3a1d8fa45f22503ba9841d71b7ea630d400b2ae5 (diff) | |
download | nextcloud-server-9d95391ff14a1c753e8fda4ecaacc007572552f4.tar.gz nextcloud-server-9d95391ff14a1c753e8fda4ecaacc007572552f4.zip |
adjust tests and apply sorting
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/js/share.js b/core/js/share.js index 86954b2ced2..381c42c5de2 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -240,13 +240,14 @@ OC.Share = _.extend(OC.Share || {}, { * Loop over all recipients in the list and format them using * all kind of fancy magic. * - * @param {String[]} recipients array of all the recipients + * @param {Object} recipients array of all the recipients * @return {String[]} modified list of recipients */ _formatShareList: function(recipients) { var _parent = this; - return $.map(recipients, function(shareWithDisplayName, shareWith) { - return _parent._formatRemoteShare(shareWith, shareWithDisplayName, t('core', 'Shared with')); + recipients = _.sortBy(_.toArray(recipients), 'shareWithDisplayName'); + return $.map(recipients, function(recipient) { + return _parent._formatRemoteShare(recipient.shareWith, recipient.shareWithDisplayName, t('core', 'Shared with')); }); }, /** |