LevisNgigi commented on code in PR #36490:
URL: https://github.com/apache/superset/pull/36490#discussion_r2639591981
##########
superset-frontend/src/features/home/RightMenu.tsx:
##########
@@ -335,7 +342,18 @@ const RightMenu = ({
const handleDatabaseAdd = () => setQuery({ databaseAdded: true });
const handleLogout = () => {
- localStorage.removeItem('redux');
+ try {
+ if (typeof window !== 'undefined') {
+ if (window.localStorage?.removeItem) {
+ window.localStorage.removeItem('redux');
+ }
+ if (window.sessionStorage?.removeItem) {
+ window.sessionStorage.removeItem('login_attempted');
+ }
+ }
+ } catch {
+ // Swallow storage errors to avoid crashing when storage is unavailable
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]