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>
|
<template>
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<h1 class="title task-id">
|
<h1 class="title task-id">
|
||||||
{{ task.getTextIdentifier() }}
|
{{ task.getTextIdentifier && task.getTextIdentifier() ? task.getTextIdentifier() : '' }}
|
||||||
</h1>
|
</h1>
|
||||||
<div class="is-done" v-if="task.done">Done</div>
|
<div class="is-done" v-if="task.done">Done</div>
|
||||||
<h1
|
<h1
|
||||||
|
|
|
@ -182,6 +182,10 @@ Vue.component('card', Card)
|
||||||
Vue.mixin({
|
Vue.mixin({
|
||||||
methods: {
|
methods: {
|
||||||
formatDateSince: date => {
|
formatDateSince: date => {
|
||||||
|
if (date === null) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof date === 'string') {
|
if (typeof date === 'string') {
|
||||||
date = new Date(date)
|
date = new Date(date)
|
||||||
}
|
}
|
||||||
|
@ -198,6 +202,10 @@ Vue.mixin({
|
||||||
return formatted
|
return formatted
|
||||||
},
|
},
|
||||||
formatDate: date => {
|
formatDate: date => {
|
||||||
|
if (date === null) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof date === 'string') {
|
if (typeof date === 'string') {
|
||||||
date = new Date(date)
|
date = new Date(date)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue