From e1fe8f2427b4267dab2faab03561c95cdede2b20 Mon Sep 17 00:00:00 2001 From: "wangjuerong@qianmi.com" Date: Mon, 18 Jan 2021 19:31:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(h5):=E4=BF=AE=E5=A4=8DVideo=E7=BB=84?= =?UTF-8?q?=E4=BB=B6ref=E4=B8=BA=E7=A9=BA=E8=80=8C=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=9A=82=E5=81=9C=E6=92=AD=E6=94=BE=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?(NervJS#8550)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-components/src/components/video/video.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/taro-components/src/components/video/video.tsx b/packages/taro-components/src/components/video/video.tsx index 75541edfa4e4..a830771521dc 100644 --- a/packages/taro-components/src/components/video/video.tsx +++ b/packages/taro-components/src/components/video/video.tsx @@ -509,7 +509,11 @@ export class Video implements ComponentInterface { style={{ 'object-fit': objectFit }} - ref={dom => (this.videoRef = dom as HTMLVideoElement)} + ref={dom => { + if (dom) { + this.videoRef = dom as HTMLVideoElement + } + }} src={src} autoplay={autoplay} loop={loop}