Move every Cards.findOne() to the ReactiveCache

This commit is contained in:
Martin Filser 2022-12-16 16:36:47 +01:00
parent a182482cfb
commit 3b65113d05
24 changed files with 96 additions and 87 deletions

View file

@ -1,3 +1,5 @@
import { ReactiveCache } from '/imports/reactiveCache';
const commentFormIsOpen = new ReactiveVar(false);
BlazeComponent.extendComponent({
@ -24,7 +26,7 @@ BlazeComponent.extendComponent({
let boardId = card.boardId;
let cardId = card._id;
if (card.isLinkedCard()) {
boardId = Cards.findOne(card.linkedId).boardId;
boardId = ReactiveCache.getCard(card.linkedId).boardId;
cardId = card.linkedId;
} else if (card.isLinkedBoard()) {
boardId = card.linkedId;