mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-11 09:51:30 +00:00
fix: prevent success toast when workspace selection is cancelled
This commit is contained in:
@@ -152,8 +152,10 @@ const AppTitleBar = () => {
|
|||||||
|
|
||||||
const handleOpenWorkspace = async () => {
|
const handleOpenWorkspace = async () => {
|
||||||
try {
|
try {
|
||||||
await dispatch(openWorkspaceDialog());
|
const result = await dispatch(openWorkspaceDialog());
|
||||||
toast.success('Workspace opened successfully');
|
if (result) {
|
||||||
|
toast.success('Workspace opened successfully');
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
toast.error(error.message || 'Failed to open workspace');
|
toast.error(error.message || 'Failed to open workspace');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user