fix(AudioTrack):Add check for NaN value for volume

This commit is contained in:
Hristo Terezov 2021-01-06 17:47:46 -06:00
parent fdb8f76b90
commit 2e5e9a3f79
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ export default class AudioTrack extends Component<Props> {
const currentVolume = this._ref.volume;
const nextVolume = nextProps.volume;
if (typeof nextVolume === 'number' && currentVolume !== nextVolume) {
if (typeof nextVolume === 'number' && !isNaN(nextVolume) && currentVolume !== nextVolume) {
this._ref.volume = nextVolume;
}