fix corner case in unsafe evaluate (#4887)

fixes #4886
This commit is contained in:
Alex Lam S.L
2021-05-01 00:24:39 +01:00
committed by GitHub
parent 8e4a19ffec
commit df980db4a8
2 changed files with 22 additions and 1 deletions

View File

@@ -3181,3 +3181,23 @@ issue_4552: {
}
expect_stdout: "NaN"
}
issue_4886: {
options = {
evaluate: true,
unsafe: true,
}
input: {
console.log("length" in {
__proto__: function() {},
length: void 0,
});
}
expect: {
console.log("length" in {
__proto__: function() {},
length: void 0,
});
}
expect_stdout: "true"
}