From 311bf133d0f8520566ab3e99f442c2ca6b710449 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Tue, 11 Apr 2023 15:26:24 +0700
Subject: fix product slider layout

---
 src/pages/video.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/pages/video.jsx')

diff --git a/src/pages/video.jsx b/src/pages/video.jsx
index 708c3368..61790dbb 100644
--- a/src/pages/video.jsx
+++ b/src/pages/video.jsx
@@ -33,7 +33,7 @@ export default function Video() {
               <div className='shadow bg-white rounded' key={video.id}>
                 <LazyLoadComponent>
                   <iframe
-                    src={`https://www.youtube.com/embed/${video.url.match(/v=([^&]*)/)[1]}`}
+                    src={`https://www.youtube.com/embed/${video.url.match(/v=([^&]*)/)?.[1] || ''}`}
                     title='YouTube video player'
                     allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share'
                     allowFullScreen={true}
-- 
cgit v1.2.3

