react-frame-component 5.2.6 → 5.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -16,7 +16,7 @@ declare module 'react-frame-component' {
16
16
  export default FrameComponent;
17
17
 
18
18
  export interface FrameContextProps {
19
- document?: HTMLDocument;
19
+ document?: Document;
20
20
  window?: Window;
21
21
  }
22
22
 
package/lib/Frame.js CHANGED
@@ -151,6 +151,10 @@ var Frame = exports.Frame = function (_Component) {
151
151
 
152
152
  var mountTarget = this.getMountTarget();
153
153
 
154
+ if (!mountTarget) {
155
+ return null;
156
+ }
157
+
154
158
  return [_reactDom2.default.createPortal(this.props.head, this.getDoc().head), _reactDom2.default.createPortal(contents, mountTarget)];
155
159
  }
156
160
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-frame-component",
3
- "version": "5.2.6",
3
+ "version": "5.2.7",
4
4
  "description": "React component to wrap your application or component in an iFrame for encapsulation purposes",
5
5
  "main": "lib/index.js",
6
6
  "files": [