diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-09-02 19:02:06 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-09-03 13:01:14 +0200 |
commit | 73c61941e28579dc92ea094fdf3272bcb68ae437 (patch) | |
tree | efa62f143fa29487d6b9b5ec7fa76faf4687f8c2 /apps/files/js | |
parent | 8684420d0a503f5c913343eca838b3a7dc903506 (diff) | |
download | nextcloud-server-73c61941e28579dc92ea094fdf3272bcb68ae437.tar.gz nextcloud-server-73c61941e28579dc92ea094fdf3272bcb68ae437.zip |
Tags in FileInfo map must be an array
Fixes FileList.elementToFile to make an array for the tags instead of
keeping the original joined string
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/tagsplugin.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files/js/tagsplugin.js b/apps/files/js/tagsplugin.js index ed1105a1706..609e38ca9a9 100644 --- a/apps/files/js/tagsplugin.js +++ b/apps/files/js/tagsplugin.js @@ -150,7 +150,13 @@ var oldElementToFile = fileList.elementToFile; fileList.elementToFile = function($el) { var fileInfo = oldElementToFile.apply(this, arguments); - fileInfo.tags = $el.attr('data-tags') || []; + var tags = $el.attr('data-tags'); + if (_.isUndefined(tags)) { + tags = ''; + } + tags = tags.split('|'); + tags = _.without(tags, ''); + fileInfo.tags = tags; return fileInfo; }; }, |