Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(Modal): set Modal.openCount floor to 0 (#1368)
  • Loading branch information
x0a authored and TheSharpieOne committed Jan 18, 2019
1 parent ee15c86 commit 71f9574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Modal.js
Expand Up @@ -277,7 +277,7 @@ class Modal extends React.Component {
const modalOpenClassNameRegex = new RegExp(`(^| )${modalOpenClassName}( |$)`);
document.body.className = document.body.className.replace(modalOpenClassNameRegex, ' ').trim();
}
Modal.openCount -= 1;
Modal.openCount = Math.max(0, Modal.openCount - 1);

setScrollbarWidth(this._originalBodyPadding);
}
Expand Down

0 comments on commit 71f9574

Please sign in to comment.