Переглянути джерело

fix(eslint): Add no-eq-null rule

dev1
hristoterezov 8 роки тому
джерело
коміт
6095a3a95d

+ 1
- 0
.eslintrc.js Переглянути файл

@@ -84,6 +84,7 @@ module.exports = {
84 84
         'no-else-return': 2,
85 85
         'no-empty-function': 2,
86 86
         'no-empty-pattern': 2,
87
+        'no-eq-null': 2,
87 88
         'no-eval': 2,
88 89
         'no-extend-native': 2,
89 90
         'no-extra-label': 2,

+ 1
- 1
modules/RTC/TraceablePeerConnection.js Переглянути файл

@@ -201,7 +201,7 @@ function TraceablePeerConnection(rtc, id, signalingLayer, ice_config,
201 201
  * Returns a string representation of a SessionDescription object.
202 202
  */
203 203
 const dumpSDP = function(description) {
204
-    if (typeof description === 'undefined' || description == null) {
204
+    if (typeof description === 'undefined' || description === null) {
205 205
         return '';
206 206
     }
207 207
 

+ 1
- 1
modules/xmpp/SDP.js Переглянути файл

@@ -263,7 +263,7 @@ SDP.prototype.toJingle = function(elem, thecreator) {
263 263
                         // but msid stands for the stream id, makes no sense ?
264 264
                         msid = localTrack.getTrackId();
265 265
                     }
266
-                    if(msid != null) {
266
+                    if(msid !== null) {
267 267
                         msid = SDPUtil.filter_special_chars(msid);
268 268
                         elem.c('parameter');
269 269
                         elem.attrs({name: 'msid', value:msid});

+ 1
- 1
modules/xmpp/xmpp.js Переглянути файл

@@ -281,7 +281,7 @@ export default class XMPP extends Listenable {
281 281
         }
282 282
         // Constant JIDs need some random part to be appended in order to be
283 283
         // able to join the MUC more than once.
284
-        if (this.authenticatedUser || cfgNickname != null) {
284
+        if (this.authenticatedUser || cfgNickname !== null) {
285 285
             mucNickname += '-' + RandomUtil.randomHexString(6);
286 286
         }
287 287
 

Завантаження…
Відмінити
Зберегти