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
why ts would assume the condition in filter callback will never reach and mainChannel is always null
mainChannel
null
interface IMultiLensChannelCfg { main?: boolean } declare const channels: IMultiLensChannelCfg[] let mainChannel: IMultiLensChannelCfg | null = null; const secondaryChannels = channels.filter((e) => { if (!e.main) { return true; } mainChannel = e; return false; }); const mChannel = mainChannel; return ( <> {mainChannel !== null && <web-component channelId={mainChannel.id} />} <> );
The text was updated successfully, but these errors were encountered:
The text of the template you used to post this issue explained why this happens. Duplicate of #9998
Sorry, something went wrong.
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
why ts would assume the condition in filter callback will never reach and
mainChannel
is alwaysnull
The text was updated successfully, but these errors were encountered: