gajus/youtube-player

Constructor function doesn't handle null values.

Ferrus91 opened this issue · 2 comments

at new Promise (<anonymous>) at Object.<anonymous>.exports.default (/Users/samuelkeays/content-lab-renderer/node_modules/youtube-player/dist/index.js:64:24) at YouTube._this.createPlayer (/Users/samuelkeays/content-lab-renderer/node_modules/react-youtube/dist/YouTube.js:147:58)

This issue could be avoided by doing an addiitonal check on null.

gajus commented

Whats the code?

Just tried to replace this issue and it seems to handle null values correctly?

Uncaught (in promise) Error: YouTube player element ID required. Kn www-widgetapi.js:948 Tn www-widgetapi.js:985 playerAPIReady index.js:74 promise callback*exports.default/playerAPIReady< index.js:72 default index.js:64 <anonymous> (index):13 www-widgetapi.js:948:135 Kn www-widgetapi.js:948 Tn www-widgetapi.js:985 playerAPIReady index.js:74 (Async: promise callback) playerAPIReady index.js:72 default index.js:64 <anonymous> (index):13

Are you suggesting that the player should be able to play without a video ID?