Skip to content

Commit

Permalink
Merge pull request #6604 from jupyterlab/showerror-cleanup
Browse files Browse the repository at this point in the history
Cleanup showErrorMessage
  • Loading branch information
jasongrout committed Jun 20, 2019
2 parents c952a47 + f11df02 commit d3515a2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/apputils/src/dialog.ts
Expand Up @@ -60,9 +60,16 @@ export function showErrorMessage(
title: title,
body: body,
buttons: buttons
}).then(() => {
Private.errorMessagePromiseCache.delete(key);
});
}).then(
() => {
Private.errorMessagePromiseCache.delete(key);
},
error => {
// TODO: Use .finally() above when supported
Private.errorMessagePromiseCache.delete(key);
throw error;
}
);
Private.errorMessagePromiseCache.set(key, dialogPromise);
return dialogPromise;
}
Expand Down

0 comments on commit d3515a2

Please sign in to comment.