Skip to content

Commit 4a13040

Browse files
committed
Remove "hacky" code now that window is defined inside the server-side Javascript VM
1 parent 07d3cb3 commit 4a13040

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
//= require_self
22
//= require_tree ./components
3-
4-
// This is because we compile this file into a JS VM
5-
// for server rendering, and some components may be
6-
// .coffee and wrapped in a func, so they need a
7-
// global to glom on to.
8-
var self, window, global = global || window || self;

test/dummy/app/assets/javascripts/components/Todo.js.jsx.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Todo = React.createClass
66

77
# Because Coffee files are in an anonymous function,
88
# expose it for server rendering tests
9-
global.Todo = Todo
9+
window.Todo = Todo

0 commit comments

Comments
 (0)