Handle falsy values for filename (#4766)
This commit is contained in:
parent
afc7c1ac64
commit
3f382e5979
2 changed files with 6 additions and 2 deletions
|
@ -29,8 +29,11 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
fileName() {
|
fileName() {
|
||||||
|
if (this.url) {
|
||||||
const filename = this.url.substring(this.url.lastIndexOf('/') + 1);
|
const filename = this.url.substring(this.url.lastIndexOf('/') + 1);
|
||||||
return filename;
|
return filename || this.$t('CONVERSATION.UNKNOWN_FILE_TYPE');
|
||||||
|
}
|
||||||
|
return this.$t('CONVERSATION.UNKNOWN_FILE_TYPE');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
"REPLYING_TO": "You are replying to:",
|
"REPLYING_TO": "You are replying to:",
|
||||||
"REMOVE_SELECTION": "Remove Selection",
|
"REMOVE_SELECTION": "Remove Selection",
|
||||||
"DOWNLOAD": "Download",
|
"DOWNLOAD": "Download",
|
||||||
|
"UNKNOWN_FILE_TYPE": "Unknown File",
|
||||||
"UPLOADING_ATTACHMENTS": "Uploading attachments...",
|
"UPLOADING_ATTACHMENTS": "Uploading attachments...",
|
||||||
"SUCCESS_DELETE_MESSAGE": "Message deleted successfully",
|
"SUCCESS_DELETE_MESSAGE": "Message deleted successfully",
|
||||||
"FAIL_DELETE_MESSSAGE": "Couldn't delete message! Try again",
|
"FAIL_DELETE_MESSSAGE": "Couldn't delete message! Try again",
|
||||||
|
|
Loading…
Reference in a new issue