Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit df32610

Browse files
committed
Fix to ensure that global, self, and window are all pre-defined (see
similar: reactjs/react-rails#84)
1 parent 12477ff commit df32610

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)