`typeof mixed === 'object' && mixed` should not report sketchy-null-mixed
Aperta
linter
- Lingua principale
- Rust
- Stelle
- 22.3k
- Fork
- 1.9k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Consider these 2 snippets:
```javascript
declare var m : ?mixed;
if (typeof m === 'object' && m) {
/*snip*/
}
if (typeof m === 'object') {
if (m) {
}
}
```
In the first case flow-lint reports a `sketchy-null-mixed` error, while in the second case it does not. I think that flow should not report an error in both cases, since the only falsy value with type === 'object' is `null`.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.