feat(Audio): fix react warning

This commit is contained in:
Saúl Ibarra Corretgé 2018-09-21 15:53:44 +02:00 committed by Saúl Ibarra Corretgé
parent 0474031a78
commit d290d28248
1 changed files with 1 additions and 3 deletions

View File

@ -41,11 +41,9 @@ export default class Audio extends AbstractAudio {
* @returns {ReactElement} * @returns {ReactElement}
*/ */
render() { render() {
const loop = this.props.loop ? 'true' : null;
return ( return (
<audio <audio
loop = { loop } loop = { Boolean(this.props.loop) }
onCanPlayThrough = { this._onCanPlayThrough } onCanPlayThrough = { this._onCanPlayThrough }
preload = 'auto' preload = 'auto'