From 6204e075b4815319b6920e3f9f40e29f16fd53cc Mon Sep 17 00:00:00 2001 From: Paul Kaplan <pkaplan@media.mit.edu> Date: Mon, 11 Dec 2017 10:17:57 -0500 Subject: [PATCH] Check for the selected sound before rendering the editor --- src/containers/sound-tab.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/sound-tab.jsx b/src/containers/sound-tab.jsx index 6143175dd..d61bea131 100644 --- a/src/containers/sound-tab.jsx +++ b/src/containers/sound-tab.jsx @@ -104,7 +104,7 @@ class SoundTab extends React.Component { onDeleteClick={this.handleDeleteSound} onItemClick={this.handleSelectSound} > - {sprite.sounds && sprite.sounds.length > 0 ? ( + {sprite.sounds && sprite.sounds[this.state.selectedSoundIndex] ? ( <SoundEditor soundIndex={this.state.selectedSoundIndex} /> ) : null} {this.props.soundRecorderVisible ? ( -- GitLab