Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Don't queue dispatching of close actions
Browse files Browse the repository at this point in the history
Issue #1361
  • Loading branch information
pablosichert committed Jan 13, 2018
1 parent dbb5057 commit 28ed7a5
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/components/app/RawModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ class RawModal extends Component {
removeModal = async () => {
const { dispatch, modalVisible, windowType, viewId } = this.props;

for (const action of [
closeRawModal(),
closeModal(),
closeListIncludedView({
windowType,
viewId,
forceClose: true
})
]) {
await dispatch(action);
}
await Promise.all(
[
closeRawModal(),
closeModal(),
closeListIncludedView({
windowType,
viewId,
forceClose: true
})
].map(action => dispatch(action))
);

if (!modalVisible) {
document.body.style.overflow = "auto";
Expand Down

0 comments on commit 28ed7a5

Please sign in to comment.