Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 17e9da3

Browse files
committedJan 23, 2015
0.13.3
1 parent c532bd1 commit 17e9da3

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed
 

‎OverlayMixin.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,15 @@ module.exports = {
4949
this._mountOverlayTarget();
5050
}
5151

52+
var overlay = this.renderOverlay();
53+
5254
// Save reference to help testing
53-
this._overlayInstance = React.render(this.renderOverlay(), this._overlayTarget);
55+
if (overlay !== null) {
56+
this._overlayInstance = React.render(overlay, this._overlayTarget);
57+
} else {
58+
// Unrender if the component is null for transitions to null
59+
this._unrenderOverlay();
60+
}
5461
},
5562

5663
_unrenderOverlay: function () {
@@ -63,7 +70,11 @@ module.exports = {
6370
throw new Error('getOverlayDOMNode(): A component must be mounted to have a DOM node.');
6471
}
6572

66-
return this._overlayInstance.getDOMNode();
73+
if (this._overlayInstance) {
74+
return this._overlayInstance.getDOMNode();
75+
}
76+
77+
return null;
6778
},
6879

6980
getContainerDOMNode: function () {

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-bootstrap",
3-
"version": "0.13.2",
3+
"version": "0.13.3",
44
"description": "Bootstrap 3 components build with React",
55
"homepage": "http://react-bootstrap.github.io/",
66
"main": "main.js",

0 commit comments

Comments
 (0)
This repository has been archived.