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
webmiraclepro committed Sep 8, 2015
1 parent 609d8d2 commit c0ed365
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 c0ed365

Please sign in to comment.