瀏覽代碼

Fix TypeError: undefined is not an object

j8
Lyubo Marinov 8 年之前
父節點
當前提交
d371a3d5fd
共有 1 個檔案被更改,包括 6 行新增0 行删除
  1. 6
    0
      modules/UI/videolayout/VideoContainer.js

+ 6
- 0
modules/UI/videolayout/VideoContainer.js 查看文件

310
     }
310
     }
311
 
311
 
312
     resize (containerWidth, containerHeight, animate = false) {
312
     resize (containerWidth, containerHeight, animate = false) {
313
+        // XXX Prevent TypeError: undefined is not an object when the Web
314
+        // browser does not support WebRTC (yet).
315
+        if (this.$video.length === 0) {
316
+            return;
317
+        }
318
+
313
         let [width, height]
319
         let [width, height]
314
             = this.getVideoSize(containerWidth, containerHeight);
320
             = this.getVideoSize(containerWidth, containerHeight);
315
         let { horizontalIndent, verticalIndent }
321
         let { horizontalIndent, verticalIndent }

Loading…
取消
儲存