Skip to content
New issue

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

running example Error: Type error: This kind of expression is always truthy. #55

Closed
shouari opened this issue Sep 20, 2024 · 2 comments
Closed

Comments

@shouari
Copy link

shouari commented Sep 20, 2024

hello
while running the exmaple (docker compose build) I'm constanatly facing this error Type error: This kind of expression is always truthy.
Can anyone help with this?

Screenshot for ref.
image

@shouari shouari changed the title Help needed--running example I face error running example Error: Type error: This kind of expression is always truthy. Sep 20, 2024
@shouari
Copy link
Author

shouari commented Sep 20, 2024

Issue was solved by changing from this code:
switch (condition) { case "required": return <div className={style}>This field is required.</div>; case "minLength" || "maxLength": return ( <div className={style}> Your password must be between 8 and 64 characters long. </div> ); }

to this: switch (condition) { case "required": return <div className={style}>This field is required.</div>; case "minLength": case "maxLength": return ( <div className={style}> Your password must be between 8 and 64 characters long. </div> ); }
in the indicated files. There are 3 or 4 to be corrected

@shouari shouari closed this as completed Sep 20, 2024
@Cajuteq
Copy link

Cajuteq commented Sep 23, 2024

For people who have that in the codebase and are asking themself what happened, it was a hidden bug that was revealed by Typescript 5.6 update. Here is the PR microsoft/TypeScript#59217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants