Loading
refactor: Remove additional allChecks optional checks
Description
This change removes optional chaining operators (?.) from several places where allChecks is accessed. The optional chaining was unnecessary since allChecks is guaranteed to be an array, so the code now directly accesses it with . instead of ?.. This simplifies the code and removes redundant null/undefined checks while maintaining the same functionality. The change affects both the language server policy and feature state diagnostics renderer components.
Related Issues
Resolves: [VSCode] Refactor allChecks checks to clean up ... (#1964 - closed) LS Change: [LS] Make allChecks non-optional in FeatureState (gitlab-org/editor-extensions/gitlab-lsp#928 - closed)
How has this been tested?
-
If src/browserorsrc/commonhas been modified, please consider interoperability with the Web IDE. See Running the Extension in WebIDE. -
Consider an end-to-end test for significant new features that aren't covered by integration tests.
Screenshots (if appropriate)
What CHANGELOG entry will this MR create?
-
fix:Bug fix fixes - a user-facing issue in production - included in changelog -
feature:New feature - a user-facing change which adds functionality - included in changelog -
BREAKING CHANGE:(fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog -
None - other non-user-facing changes