Skip to content

Commit 11d61ce

Browse files
committed
Merge pull request reactjs#6 from jchapple/dev-global-scope-fix
Fix to ensure that global, self, and window are all pre-defined
2 parents 12477ff + df32610 commit 11d61ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactJS.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function __construct($libsrc, $appsrc) {
5858
$react = array();
5959
// stubs, react
6060
$react[] = "var console = {warn: function(){}, error: print}";
61-
$react[] = "var global = {}";
61+
$react[] = "var global = global || this, self = self || this, window = window || this";
6262
$react[] = $libsrc;
6363
$react[] = "var React = global.React";
6464
// app's components

0 commit comments

Comments
 (0)