Skip to content

Commit 1e72868

Browse files
committed
Support rendering directly into document
1 parent 53212cd commit 1e72868

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rendering-interface.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
/**
2-
* Rendering interface for application controllers.
3-
*
4-
* 2013 (c) Andrey Popp <[email protected]>
5-
*/
61
"use strict";
72

83
var React = require('react');
4+
var ReactMount = require('react/lib/ReactMount');
95
var invariant = require('react/lib/invariant');
106
var request = require('./request');
117

@@ -26,6 +22,10 @@ module.exports = {
2622
render: function(element, req, cb) {
2723
var controller;
2824

25+
if (typeof document !== 'undefined' && document === element) {
26+
ReactMount.allowFullPageRender = true;
27+
}
28+
2929
if (typeof req === 'function') {
3030
cb = req;
3131
req = null;

0 commit comments

Comments
 (0)