Skip to content

Simplify 'solid' || '' in viewPaneContainer.ts#198515

Merged
mjbvz merged 2 commits into
microsoft:mainfrom
a-stewart:JSC_SUSPICIOUS_LEFT_OPERAND_OF_LOGICAL_OPERATOR
Nov 20, 2023
Merged

Simplify 'solid' || '' in viewPaneContainer.ts#198515
mjbvz merged 2 commits into
microsoft:mainfrom
a-stewart:JSC_SUSPICIOUS_LEFT_OPERAND_OF_LOGICAL_OPERATOR

Conversation

@a-stewart
Copy link
Copy Markdown
Contributor

There is a slightly odd string in viewPaneContrainer.ts which is set to 'solid' || ''. Since the LHS is constant and truthy, this is identical to just setting the value to 'solid' (but slightly less readable).

My guess is that this was initially a variable, and then became constant. There is probably no issue as I assume most compilers would compile this out, but ours gives an error of JSC_SUSPICIOUS_LEFT_OPERAND_OF_LOGICAL_OPERATOR so we patch it out.

@aiday-mar
Copy link
Copy Markdown
Contributor

Not sure if I should assign this to you @mjbvz ?

@aiday-mar aiday-mar removed their assignment Nov 17, 2023
@mjbvz mjbvz enabled auto-merge (squash) November 20, 2023 17:09
@vscodenpa vscodenpa added this to the November 2023 milestone Nov 20, 2023
@mjbvz mjbvz merged commit 9cbc6ef into microsoft:main Nov 20, 2023
Splizard pushed a commit to Splizard/vscode-mobile that referenced this pull request Nov 21, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants