From ac6799211d7036d9c9b9b7a2f902dabaeb4fb8ff Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Wed, 8 Apr 2020 23:16:14 +0300 Subject: [PATCH] Exclude cases when length can be called on null or undefined --- src/views/reports/components/Report.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/reports/components/Report.vue b/src/views/reports/components/Report.vue index b0cb6eb2..9a66c206 100644 --- a/src/views/reports/components/Report.vue +++ b/src/views/reports/components/Report.vue @@ -41,7 +41,7 @@ (deactivated) -
+
{{ $t('reports.content') }}: {{ report.content }} @@ -151,7 +151,7 @@ export default { return 'primary' } }, - getStatusesTitle(statuses) { + getStatusesTitle(statuses = []) { return `Reported statuses: ${statuses.length} item(s)` }, getNotesTitle(notes = []) { @@ -167,7 +167,7 @@ export default { parseTimestamp(timestamp) { return moment(timestamp).format('L HH:mm') }, - showStatuses(statuses) { + showStatuses(statuses = []) { return statuses.length > 0 } }