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 #2
  • Loading branch information
cookpete committed Sep 10, 2015
1 parent f912f13 commit da15b0a
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 da15b0a

Please sign in to comment.