fix(AudioTrack):Add check for NaN value for volume
This commit is contained in:
parent
fdb8f76b90
commit
2e5e9a3f79
|
@ -135,7 +135,7 @@ export default class AudioTrack extends Component<Props> {
|
||||||
const currentVolume = this._ref.volume;
|
const currentVolume = this._ref.volume;
|
||||||
const nextVolume = nextProps.volume;
|
const nextVolume = nextProps.volume;
|
||||||
|
|
||||||
if (typeof nextVolume === 'number' && currentVolume !== nextVolume) {
|
if (typeof nextVolume === 'number' && !isNaN(nextVolume) && currentVolume !== nextVolume) {
|
||||||
this._ref.volume = nextVolume;
|
this._ref.volume = nextVolume;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue