Skip to content

Commit

Permalink
Merge pull request #53 from danielr18/fix-html5-ssr
Browse files Browse the repository at this point in the history
Create AudioContext in HTML5 vendor on componentDidMount
  • Loading branch information
souporserious authored Dec 22, 2018
2 parents 949aa8e + fce5aa6 commit 89f61b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vendors/HTML5.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import { findDOMNode } from 'react-dom'
import vendorPropTypes from './vendor-prop-types'

const AudioContext = window.AudioContext || window.webkitAudioContext
const AudioContext = typeof window === 'undefined' ? false : (window.AudioContext || window.webkitAudioContext)
let audioContext

if (AudioContext) {
Expand Down

0 comments on commit 89f61b4

Please sign in to comment.