gajus / youtube-player

YouTube iframe API abstraction.
Other
364 stars 80 forks source link

Avoid referencing undefined document #70

Closed Ornhoj closed 5 years ago

Ornhoj commented 6 years ago

Avoid referencing document methods when document is not defined. This will happen when serverside rendering the player - thus causing an internal error.

gajus commented 5 years ago

In what setup would this cause an issue?

document would be (can be) defined in all server-side rendering solutions that I know of.

Since this library is designed for consumption in a browser, this one-off check seems out of place.

resistdesign commented 5 years ago

@Ornhoj This issue/PR is old and seems unnecessary so I'm closing it. If you believe this is still a problem please go ahead and open it again.