Closed Mehuge closed 2 years ago
Thanks for the comprehensive ticket, I'll take a look
This repro can be simplified to
async function myfunc()
{
return await myfunc() === "value";
}
The issues is how await
is evaluated wrt ===
, it thinks the return type is always a number, so they are never strictly equal in this case, hence getting !1
Fixed in 1.17.7
Combination of await and === comparison causes nuglify to substitute with false. Similar happens with !==
Example Code
Resulting Minified code: The
example2()
method just setsthis.myfuncresult
to false.Version: 1.17.3
Code used to run the minifier: