Skip to content

Commit

Permalink
JS: More alert updates in UselessConditional
Browse files Browse the repository at this point in the history
  • Loading branch information
asgerf committed Feb 25, 2025
1 parent 5e375f8 commit b1f2ef9
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async function awaitFlow(){

(function() {
function f1(x) {
x || y // $ Alert - but whitelisted
x || y // OK
}
f1(true);

Expand All @@ -79,7 +79,7 @@ async function awaitFlow(){

function f3(x) {
(function(){
x || y // $ Alert - but whitelisted
x || y // OK
});
}
f3(true);
Expand Down Expand Up @@ -150,7 +150,7 @@ async function awaitFlow(){
var v = p();
if (v) { // $ Alert
}
if (v) { // $ Alert - but not detected due to SSA limitations
if (v) { // $ MISSING: Alert - due to SSA limitations
}
});

Expand All @@ -165,7 +165,7 @@ async function awaitFlow(){
var v = findOrThrow();
if (v) { // $ Alert
}
if (v) { // $ Alert - but not detected due to SSA limitations
if (v) { // $ MISSING: Alert - due to SSA limitations
}
});

Expand All @@ -180,7 +180,7 @@ async function awaitFlow(){
(function() {
function outer(x) {
addEventListener("click", () => {
if (!x && something()) { // $ Alert - but whitelisted
if (!x && something()) { // OK
something();
}
});
Expand Down

0 comments on commit b1f2ef9

Please sign in to comment.