aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-09-02 19:02:06 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-03 13:01:14 +0200
commit73c61941e28579dc92ea094fdf3272bcb68ae437 (patch)
treeefa62f143fa29487d6b9b5ec7fa76faf4687f8c2 /apps/files/js
parent8684420d0a503f5c913343eca838b3a7dc903506 (diff)
downloadnextcloud-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.js8
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;
};
},