瀏覽代碼

currentBoard is very often called in jade files, so use there the cache too

Martin Filser 2 年之前
父節點
當前提交
30d154724a
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      client/lib/utils.js

+ 3 - 1
client/lib/utils.js

@@ -1,3 +1,5 @@
+import { ReactiveCache } from '/imports/reactiveCache';
+
 Utils = {
   setBackgroundImage(url) {
     const currentBoard = Boards.findOne(Session.get('currentBoard'));
@@ -36,7 +38,7 @@ Utils = {
    */
   getCurrentBoard() {
     const boardId = Utils.getCurrentBoardId();
-    const ret = Boards.findOne(boardId);
+    const ret = ReactiveCache.getBoard(boardId);
     return ret;
   },
   getCurrentCard(ignorePopupCard) {