mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
The history of updates to this test got messed up so just squashing into one commit. Some possible regressions have been accepted, but the query is strangely opinionated so it's just hard to say what it ought to flag.
19 lines
374 B
JavaScript
19 lines
374 B
JavaScript
(function(){
|
|
var v;
|
|
(function(){
|
|
if(typeof v === "undefined"){ // $ Alert[js/unneeded-defensive-code]
|
|
v = 42;
|
|
}
|
|
for(var v in x){
|
|
}
|
|
});
|
|
});
|
|
|
|
const isFalsyObject = (v) => typeof v === 'undefined' && v !== undefined;
|
|
|
|
function f(v) {
|
|
if (typeof v === 'undefined' && v !== undefined) {
|
|
doSomething(v);
|
|
}
|
|
}
|