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

Fix to ensure that global, self, and window are all pre-defined #6

Merged
merged 1 commit into from May 26, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion ReactJS.php
Expand Up @@ -58,7 +58,7 @@ function __construct($libsrc, $appsrc) {
$react = array();
// stubs, react
$react[] = "var console = {warn: function(){}, error: print}";
$react[] = "var global = {}";
$react[] = "var global = global || this, self = self || this, window = window || this";
$react[] = $libsrc;
$react[] = "var React = global.React";
// app's components
Expand Down