Skip to content

Commit

Permalink
Guard against no iframe contentWindow in Vimeo player
Browse files Browse the repository at this point in the history
Partially fixes cookpete/react-player#2
  • Loading branch information
philip-luther committed Nov 22, 2024
1 parent 75f006e commit 3452e1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/players/Vimeo.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class Vimeo extends Base {
postMessage = (method, value) => {
if (!this.origin) return
let data = JSON.stringify({ method, value })
return this.iframe.contentWindow.postMessage(data, this.origin)
return this.iframe.contentWindow && this.iframe.contentWindow.postMessage(data, this.origin)
}
render () {
let style = {
Expand Down

0 comments on commit 3452e1a

Please sign in to comment.