Skip to content

Commit

Permalink
fix(modal): 解决modal设置定时关闭后手动关闭后的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ShanaMaid committed Jul 5, 2018
1 parent 4be2b22 commit b3280a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,12 @@ const renderModal = (props: IModalComponentProps) => {
};

const closeModal = (modal: HTMLElement) => {
document.body.removeChild(modal);
try {
document.body.removeChild(modal);
} catch (error) {
return false;
}
return true;
};

export default {
Expand Down

0 comments on commit b3280a3

Please sign in to comment.