summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorNicu Tofan <nicu.tofan@gmail.com>2018-06-25 22:52:50 +0300
committerNicu Tofan <nicu.tofan@gmail.com>2018-06-26 14:32:51 +0300
commitc9f70cf382707141561732a46dbd3e3e2f159e6e (patch)
treea409d7f7f19741efc8e1bec546f988a5c66d9ffc /models
parent04745f0c2fe83f044032713e1864c5ac00d38ac9 (diff)
downloadwekan-c9f70cf382707141561732a46dbd3e3e2f159e6e.tar.gz
wekan-c9f70cf382707141561732a46dbd3e3e2f159e6e.tar.bz2
wekan-c9f70cf382707141561732a46dbd3e3e2f159e6e.zip
Check for null and undefined in board defaults
Diffstat (limited to 'models')
-rw-r--r--models/boards.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/boards.js b/models/boards.js
index a8b7191e..fce674ae 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -297,7 +297,7 @@ Boards.helpers({
// A board alwasy has another board where it deposits subtasks of thasks
// that belong to itself.
getDefaultSubtasksBoardId() {
- if (this.subtasksDefaultBoardId === null) {
+ if ((this.subtasksDefaultBoardId === null) || (this.subtasksDefaultBoardId === undefined)) {
this.subtasksDefaultBoardId = Boards.insert({
title: `^${this.title}^`,
permission: this.permission,
@@ -322,7 +322,7 @@ Boards.helpers({
},
getDefaultSubtasksListId() {
- if (this.subtasksDefaultListId === null) {
+ if ((this.subtasksDefaultListId === null) || (this.subtasksDefaultListId === undefined)) {
this.subtasksDefaultListId = Lists.insert({
title: TAPi18n.__('queue'),
boardId: this._id,