瀏覽代碼

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

master
Hristo Terezov 4 年之前
父節點
當前提交
2e5e9a3f79
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      react/features/base/media/components/web/AudioTrack.js

+ 1
- 1
react/features/base/media/components/web/AudioTrack.js 查看文件

135
             const currentVolume = this._ref.volume;
135
             const currentVolume = this._ref.volume;
136
             const nextVolume = nextProps.volume;
136
             const nextVolume = nextProps.volume;
137
 
137
 
138
-            if (typeof nextVolume === 'number' && currentVolume !== nextVolume) {
138
+            if (typeof nextVolume === 'number' && !isNaN(nextVolume) && currentVolume !== nextVolume) {
139
                 this._ref.volume = nextVolume;
139
                 this._ref.volume = nextVolume;
140
             }
140
             }
141
 
141
 

Loading…
取消
儲存