Protect the global name space from the code editor

This commit is contained in:
Stuart Taylor
2017-04-02 17:51:07 +01:00
committed by Berkeley Martinez
parent e50fbc05ca
commit 1126bf7004

View File

@@ -11,14 +11,17 @@ import CodeMirrorSkeleton from '../../Code-Mirror-Skeleton.jsx';
import {
executeChallenge,
classicEditorUpdated,
challengeMetaSelector,
filesSelector,
keySelector
} from '../../redux';
const envProps = typeof window !== 'undefined' ? Object.keys(window) : [];
const options = {
lint: { esversion: 6 },
lint: {
esversion: 6,
predef: envProps
},
lineNumbers: true,
mode: 'javascript',
theme: 'freecodecamp',