Commit b3455fd
committed
Avoid crash if setTimeout/clearTimeout is referenced
In some cases, React (or other libraries) will assume that setTimeout
and clearTimeout are defined on the global scope, without invoking it.
We should still throw an error in case a consumer expects this to just
work on the server (it won't), but we can avoid a crash by defining the
function on the global scope.
For context: reactjs#5551 parent 0c4ce2e commit b3455fd
1 file changed
+17
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
71 | 85 | | |
72 | 86 | | |
73 | 87 | | |
| |||
94 | 108 | | |
95 | 109 | | |
96 | 110 | | |
97 | | - | |
| 111 | + | |
0 commit comments