ソースを参照

protect against double-unrenderContentSkeleton

Adam Shaw 8 年 前
コミット
bd5deb0f37
1 ファイル変更10 行追加8 行削除
  1. 10 8
      src/agenda/TimeGrid.ts

+ 10 - 8
src/agenda/TimeGrid.ts

@@ -354,14 +354,16 @@ export default class TimeGrid extends InteractiveDateComponent {
 
 
   unrenderContentSkeleton() {
-    this.contentSkeletonEl.remove()
-    this.contentSkeletonEl = null
-    this.colContainerEls = null
-    this.helperContainerEls = null
-    this.fgContainerEls = null
-    this.bgContainerEls = null
-    this.highlightContainerEls = null
-    this.businessContainerEls = null
+    if (this.contentSkeletonEl) { // defensive :(
+      this.contentSkeletonEl.remove()
+      this.contentSkeletonEl = null
+      this.colContainerEls = null
+      this.helperContainerEls = null
+      this.fgContainerEls = null
+      this.bgContainerEls = null
+      this.highlightContainerEls = null
+      this.businessContainerEls = null
+    }
   }