Commit 60025eeb authored by Michael Henretty's avatar Michael Henretty Committed by GitHub

Revert "Revert "Only load audio src in ListenBox if it's defined (#442)" (#459)"

This reverts commit fe8f6433.
parent fe8f6433
......@@ -167,7 +167,9 @@ export default class ListenBox extends Component<Props, State> {
</div>
<audio
className="audio-box"
src={this.props.src}
// Only include the src attribute if the source is defined
// (empty src attributes are invalid)
{...this.props.src && { src: this.props.src }}
preload="auto"
onLoadStart={this.onLoadStart}
onCanPlayThrough={this.onCanPlayThrough}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment