Commit d31de940 authored by Omniscimus's avatar Omniscimus Committed by Michael Henretty
Browse files

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

parent 9e797eb1
......@@ -153,7 +153,9 @@ export default class ListenBox extends Component<Props, State> {
<Icon type="x"/>Nope.</a>
</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