fix: legacy files favorite event node type

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ 2023-07-06 18:56:41 +02:00
parent f5f142d31b
commit 2d6e50a8db
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF

View file

@ -111,6 +111,7 @@
var fileInfo = context.fileList.files[$file.index()];
var dir = context.dir || context.fileList.getCurrentDirectory();
var tags = $file.attr('data-tags');
var isFile = $file.attr('data-type') === 'file';
if (_.isUndefined(tags)) {
tags = '';
@ -121,7 +122,7 @@
// Fake Node object for vue compatibility
const node = {
type: 'folder',
type: isFile ? 'file' : 'folder',
path: (dir + '/' + fileName).replace(/\/\/+/g, '/'),
root: '/files/' + OC.getCurrentUser().uid
}