We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unminify-if-statements.ts
return x || a() -> if (!x) { return a() }
when x is true, it returns undefined
I disabled this transformer to make it work
The text was updated successfully, but these errors were encountered:
function isNullOrUndefined(value) { return value === null || value === undefined }
after the transformation
function isNullOrUndefined(value) { if (!(value === null)) { return undefined === value } }
Sorry, something went wrong.
I fixed the
return x || a()
bug by adding an else statement, so after the transform
`if (!x) { return a() } else { return(x)}
the fix for the lower half for unminifyIfStatements()
I am skipping return( a || b || c) for now
if (returnE.operator === "||") { // don't handle return( a || b || c) if (returnE.left.type!=="LogicalExpression") { // custom replace `return x || a()` -> `if (!x) { return a() } else return(x)` path.replaceWith( ifStatement( test, returnStatement(returnE.right), returnStatement(returnE.left) ) ) } } else path.replaceWith( ifStatement( test, returnStatement(returnE.right), ) ) return
No branches or pull requests
unminify-if-statements.ts
return x || a() -> if (!x) { return a() }
when x is true, it returns undefined
I disabled this transformer to make it work
The text was updated successfully, but these errors were encountered: