sound.asset might be null in tests

This commit is contained in:
GarboMuffin committed 2022-08-08 02:40:29 -05:00
1 parent 05e428dbdb
commit f552e4446f
1 file changed
+1 -1
+1 -1
View File
@@ -500,7 +500,7 @@ const mapStateToProps = (state, {soundIndex}) => {
return {
isStereo: audioBuffer.numberOfChannels !== 1,
duration: sound.sampleCount / sound.rate,
size: sound.asset.data.byteLength,
size: sound.asset ? sound.asset.data.byteLength : 0,
soundId: sound.soundId,
sampleRate: audioBuffer.sampleRate,
samples: audioBuffer.getChannelData(0),