浏览代码

Fix app hang when Meteor.user() is null and list spinner is loaded bug

Romulus Urakagi Tsai 5 年之前
父节点
当前提交
9bbeb73db1
共有 1 个文件被更改,包括 10 次插入6 次删除
  1. 10 6
      client/components/lists/listBody.js

+ 10 - 6
client/components/lists/listBody.js

@@ -701,12 +701,16 @@ BlazeComponent.extendComponent({
     this.listId = this.parentComponent().data()._id;
     this.swimlaneId = '';
 
-    const boardView = (Meteor.user().profile || {}).boardView;
-    if (boardView === 'board-view-swimlanes')
-      this.swimlaneId = this.parentComponent()
-        .parentComponent()
-        .parentComponent()
-        .data()._id;
+    let user = Meteor.user();
+    if (user) {
+      const boardView = (Meteor.user().profile || {}).boardView;
+      if (boardView === 'board-view-swimlanes') {
+        this.swimlaneId = this.parentComponent()
+          .parentComponent()
+          .parentComponent()
+          .data()._id;
+      }
+    }
   },
 
   onRendered() {