瀏覽代碼

[eslint] no-undef-init

dev1
Lyubo Marinov 8 年之前
父節點
當前提交
05c90dc42c
共有 3 個檔案被更改,包括 3 行新增2 行删除
  1. 1
    0
      .eslintrc.js
  2. 1
    1
      modules/RTC/RTC.js
  3. 1
    1
      modules/RTC/RTCUtils.js

+ 1
- 0
.eslintrc.js 查看文件

@@ -143,6 +143,7 @@ module.exports = {
143 143
         'no-restricted-globals': 0,
144 144
         'no-shadow-restricted-names': 2,
145 145
         'no-undef': 2,
146
+        'no-undef-init': 2,
146 147
         'no-undefined': 0,
147 148
         'no-unused-vars': 2,
148 149
 

+ 1
- 1
modules/RTC/RTC.js 查看文件

@@ -470,7 +470,7 @@ export default class RTC extends Listenable {
470 470
      * @private
471 471
      */
472 472
     _getRemoteTrackById(streamId, trackId) {
473
-        let result = undefined;
473
+        let result;
474 474
 
475 475
         // .find will break the loop once the first match is found
476 476
         Object.keys(this.remoteTracks).find(endpoint => {

+ 1
- 1
modules/RTC/RTCUtils.js 查看文件

@@ -60,7 +60,7 @@ const isAudioOutputDeviceChangeAvailable
60 60
 
61 61
 let currentlyAvailableMediaDevices;
62 62
 
63
-let rawEnumerateDevicesWithCallback = undefined;
63
+let rawEnumerateDevicesWithCallback;
64 64
 /**
65 65
  * "rawEnumerateDevicesWithCallback" will be initialized only after WebRTC is
66 66
  * ready. Otherwise it is too early to assume that the devices listing is not

Loading…
取消
儲存