Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) O3-2426: Closing drug search panel should send user back to order basket if they previously had it open #1452

Closed
wants to merge 7 commits into from
Prev Previous commit
Next Next commit
Add some error handling
  • Loading branch information
ibacher committed Nov 21, 2023
commit b9460a466515fed59cfed7962c19f47fe923d577
6 changes: 5 additions & 1 deletion packages/esm-patient-common-lib/src/workspaces/workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ export function closeWorkspace(name: string, ignoreChanges: boolean, onCloseWork
const promptCheckFcn = getPromptBeforeClosingFcn(name);
const updateStoreWithClosedWorkspace = () => {
if (onCloseWorkspace && typeof onCloseWorkspace === 'function') {
onCloseWorkspace?.();
try {
onCloseWorkspace();
} catch (e) {
console.error(`Custom 'onCloseWorkspace' for workspace ${name} caused an error`, e);
}
}

const state = store.getState();
Expand Down
Loading