diff --git a/packages/ui/src/views/chatflows/index.js b/packages/ui/src/views/chatflows/index.js index c87ad306..6426cdd6 100644 --- a/packages/ui/src/views/chatflows/index.js +++ b/packages/ui/src/views/chatflows/index.js @@ -47,6 +47,7 @@ const Chatflows = () => { const [view, setView] = React.useState(localStorage.getItem('flowDisplayStyle') || 'card') const handleChange = (event, nextView) => { + if (nextView === null) return localStorage.setItem('flowDisplayStyle', nextView) setView(nextView) } diff --git a/packages/ui/src/views/marketplaces/index.js b/packages/ui/src/views/marketplaces/index.js index e5a65cb9..a6d29e43 100644 --- a/packages/ui/src/views/marketplaces/index.js +++ b/packages/ui/src/views/marketplaces/index.js @@ -131,6 +131,7 @@ const Marketplace = () => { } const handleViewChange = (event, nextView) => { + if (nextView === null) return localStorage.setItem('mpDisplayStyle', nextView) setView(nextView) }