Skip to content

Commit

Permalink
Revert "Forbid using window properties as global variables" (facebook…
Browse files Browse the repository at this point in the history
…#2099)

* Revert "Ignore the yarn cache directory (facebook#2063)"

This reverts commit 94149c7.

* Revert "Forbid using window properties as global variables (facebook#1840)"

This reverts commit 5a7d8e8.
  • Loading branch information
gaearon committed May 8, 2017
1 parent 035fae1 commit 1f73ae6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fixtures/kitchensink/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class BuiltEmitter extends Component {
}

handleReady() {
document.dispatchEvent(new window.Event('ReactFeatureDidMount'));
document.dispatchEvent(new Event('ReactFeatureDidMount'));
}

render() {
Expand Down Expand Up @@ -54,7 +54,7 @@ class App extends Component {
}

componentDidMount() {
const feature = window.location.hash.slice(1);
const feature = location.hash.slice(1);
switch (feature) {
case 'array-destructuring':
import(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import React from 'react';
import aFileWithoutExt from './assets/aFileWithoutExt';

const text = aFileWithoutExt.includes('base64')
? window.atob(aFileWithoutExt.split('base64,')[1]).trim()
? atob(aFileWithoutExt.split('base64,')[1]).trim()
: aFileWithoutExt;

export default () => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import React from 'react';
import aFileWithExtUnknown from './assets/aFileWithExt.unknown';

const text = aFileWithExtUnknown.includes('base64')
? window.atob(aFileWithExtUnknown.split('base64,')[1]).trim()
? atob(aFileWithExtUnknown.split('base64,')[1]).trim()
: aFileWithExtUnknown;

export default () => (
Expand Down

0 comments on commit 1f73ae6

Please sign in to comment.