Fix checking for undefined behaviour when viewing a task
This commit is contained in:
parent
6fbfef661d
commit
35ed61839d
2 changed files with 9 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="heading">
|
||||
<h1 class="title task-id">
|
||||
{{ task.getTextIdentifier() }}
|
||||
{{ task.getTextIdentifier && task.getTextIdentifier() ? task.getTextIdentifier() : '' }}
|
||||
</h1>
|
||||
<div class="is-done" v-if="task.done">Done</div>
|
||||
<h1
|
||||
|
|
|
@ -182,6 +182,10 @@ Vue.component('card', Card)
|
|||
Vue.mixin({
|
||||
methods: {
|
||||
formatDateSince: date => {
|
||||
if (date === null) {
|
||||
return ''
|
||||
}
|
||||
|
||||
if (typeof date === 'string') {
|
||||
date = new Date(date)
|
||||
}
|
||||
|
@ -198,6 +202,10 @@ Vue.mixin({
|
|||
return formatted
|
||||
},
|
||||
formatDate: date => {
|
||||
if (date === null) {
|
||||
return ''
|
||||
}
|
||||
|
||||
if (typeof date === 'string') {
|
||||
date = new Date(date)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue