diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/cards.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js index 8e1ffcaa..987ce330 100644 --- a/models/cards.js +++ b/models/cards.js @@ -721,6 +721,18 @@ Cards.helpers({ ); } }, + + getArchived() { + if (this.isImportedCard()) { + const card = Cards.findOne({ _id: this.importedId }); + return card.archived; + } else if (this.isImportedBoard()) { + const board = Boards.findOne({ _id: this.importedId}); + return board.archived; + } else { + return this.archived; + } + }, }); Cards.mutations({ |