Open frct1 opened 6 years ago
Hi, @schroffl find a error. Method getFiles throw an error if we have one more files (icons for examples) on list.name.map function. I've replace that to
'getFiles': (cid, path, cpw) => { return query.send('ftgetfilelist', { cid, 'cpw': cpw || '', path }) .then(list => typeof list.name === 'string' ? [ { 'name': list.name, 'path': list.path, 'size': list.size, 'datetime': list.datetime, 'type': list.type == 1 ? 'file' : 'dir' } ] : list.map((file, i) => ({ 'name': file.name, path: list.path, 'size': file.size, 'datetime': file.datetime, 'type': file.type == 1 ? 'file' : 'dir'})) ); },
Works fine
p.s* but file path show normal on first item in object
[ { name: 'icon_1074977208', path: '/icons', size: '607', datetime: '1530958000', type: 'file' }, { name: 'icon_1397428609', path: undefined, size: '886', datetime: '1530958001', type: 'file' } ]
What error are you getting?
currently not at home and can not get to the development resources, but the following error Cannot read property map of undefined
Cannot read property map of undefined
Hi, @schroffl find a error. Method getFiles throw an error if we have one more files (icons for examples) on list.name.map function. I've replace that to
Works fine
p.s* but file path show normal on first item in object