]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/standalone/videos/test-embed.ts
Speed up client lint
[github/Chocobozzz/PeerTube.git] / client / src / standalone / videos / test-embed.ts
index 066b3e0246b68c8280877bb42d8003b30745eb24..a051f1f89d75974fbd6320b15e081738f73b4edb 100644 (file)
@@ -8,7 +8,7 @@ window.addEventListener('load', async () => {
 
   const isPlaylist = window.location.pathname.startsWith('/video-playlists/')
 
-  const elementId = lastPart.indexOf('?') === -1 ? lastPart : lastPart.split('?')[0]
+  const elementId = !lastPart.includes('?') ? lastPart : lastPart.split('?')[0]
 
   const iframe = document.createElement('iframe')
   iframe.src = isPlaylist