seimin 1 年之前
父节点
当前提交
8677dfdc72
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/app/views/disinfection-supply/disinfection-supply.component.ts

+ 1 - 1
src/app/views/disinfection-supply/disinfection-supply.component.ts

@@ -39,7 +39,7 @@ export class DisinfectionSupplyComponent implements OnInit, OnDestroy {
39
   ngOnDestroy(){
39
   ngOnDestroy(){
40
     clearTimeout(this.timer);
40
     clearTimeout(this.timer);
41
     clearTimeout(this.resizeTimer);
41
     clearTimeout(this.resizeTimer);
42
-    this.mySwiper.destroy();
42
+    this.mySwiper && this.mySwiper.destroy();
43
     window.onresize = null;
43
     window.onresize = null;
44
   }
44
   }
45
 
45