mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[Bugfix] Cannot read properties of null (.split())
This commit is contained in:
1 parent
2ffa3e24c8
commit
e1e46a5c0b
87 files changed
+186
-78
No files matched your search
@@ -222,7 +222,9 @@ export default {
|
||||
this.$events.on('on-subtask-edited', (subtask) => {
|
||||
if (subtask?.id !== this.subtask?.id) return
|
||||
const data = JSON.parse(JSON.stringify(subtask))
|
||||
const splittedDeadline = data.deadline.split(' ')
|
||||
|
||||
const splittedDeadline = data.deadline?.split(' ') || []
|
||||
|
||||
data.deadline = splittedDeadline[0]
|
||||
data._deadline_time = splittedDeadline[1]
|
||||
this.subtask = this._enrichTask(data)
|
||||
@@ -260,7 +262,7 @@ export default {
|
||||
}]
|
||||
this.$nextTick(() => {
|
||||
this.v$.$reset()
|
||||
this.setFocusEvent()
|
||||
this.setFocusEvent()
|
||||
})
|
||||
|
||||
try {
|
||||
@@ -312,8 +314,10 @@ export default {
|
||||
}
|
||||
this.editMode = editMode || !this.subtask.id
|
||||
} catch (error) {
|
||||
console.error('ERROR', error)
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-task-modal.vue] Error: ', error)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -372,6 +376,9 @@ export default {
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
console.log('[z-task-modal.vue] Error: ', error)
|
||||
} finally {
|
||||
this.isSaving = false
|
||||
}
|
||||
@@ -396,6 +403,7 @@ export default {
|
||||
|
||||
_mergeDeadlineTimeDate() {
|
||||
const date = new Date(this.subtask.deadline)
|
||||
console.log('z-task-modal', this.subtask)
|
||||
const timeParts = this.subtask._deadline_time.split(':')
|
||||
|
||||
date.setHours(parseInt(timeParts[0]))
|
||||
@@ -590,7 +598,7 @@ export default {
|
||||
position: relative
|
||||
border-top: 1px solid #e0e0e0
|
||||
padding: 20px 0 10px 0
|
||||
|
||||
|
||||
.splitted-time-inputs
|
||||
display: flex !important
|
||||
flex-direction: row !important
|
||||
|
||||
Reference in new issue
Block a user