Loading
Add canUseLocalStorage guard to file tree browser
What does this MR do and why?
Guards direct localStorage access in the repository file tree browser with AccessorUtilities.canUseLocalStorage() so the code does not throw when localStorage is unavailable (private/incognito mode, disabled storage, quota exceeded, SSR/non-browser environments).
Tests added for the new guard paths; existing behavior is unchanged.
References
- Resolves #592556 (closed)
- Follow-up from !226142 (comment 3136009096)
Screenshots or screen recordings
No UI changes.
How to set up and validate locally
- Visit
about:configFirefox - Set
dom.storage.enabledtofalse - Open a repository
- The file tree browser should work without any issues
- If you see a localStorage error unrelated to the repository it falls under #601167
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Jacques Erasmus