mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Don't barf if no info in m.file content
This commit is contained in:
parent
5bed0b7275
commit
a591b66732
@ -24,12 +24,14 @@ module.exports = {
|
||||
}
|
||||
|
||||
var additionals = [];
|
||||
if (content.info) {
|
||||
if (content.info.mimetype && content.info.mimetype.length > 0) {
|
||||
additionals.push(content.info.mimetype);
|
||||
}
|
||||
if (content.info.size && content.info.size.length > 0) {
|
||||
additionals.push(filesize(content.info.size));
|
||||
}
|
||||
}
|
||||
|
||||
if (additionals.length > 0) {
|
||||
linkText += ' (' + additionals.join(',') + ')';
|
||||
|
Loading…
Reference in New Issue
Block a user