From 1eecd4947203befd3f9d6602890e1ce83c8ba9ca Mon Sep 17 00:00:00 2001 From: lian Date: Wed, 24 Aug 2022 14:51:25 +0800 Subject: [PATCH] fix bug when sending share link email (#5247) Co-authored-by: lian --- frontend/src/pages/my-libs/mylib-repo-list-item.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/my-libs/mylib-repo-list-item.js b/frontend/src/pages/my-libs/mylib-repo-list-item.js index 6814b63eca..6aad093af0 100644 --- a/frontend/src/pages/my-libs/mylib-repo-list-item.js +++ b/frontend/src/pages/my-libs/mylib-repo-list-item.js @@ -166,7 +166,11 @@ class MylibRepoListItem extends React.Component { } onShareToggle = (e) => { - e.preventDefault(); + // when close share dialog after send share link email, + // there is no event + if (e != undefined) { + e.preventDefault(); + } this.setState({isShareDialogShow: !this.state.isShareDialogShow}); }