diff --git a/src/examples/compatibility-testing.jsx b/src/examples/compatibility-testing.jsx index 11c9bc4bf..3fa8e71d9 100644 --- a/src/examples/compatibility-testing.jsx +++ b/src/examples/compatibility-testing.jsx @@ -14,16 +14,22 @@ const mapStateToProps = state => ({vm: state.vm}); const VMStage = connect(mapStateToProps)(Stage); const VMControls = connect(mapStateToProps)(Controls); +const DEFAULT_PROJECT_ID = '10015059'; + class Player extends React.Component { constructor (props) { super(props); this.updateProject = this.updateProject.bind(this); + this.state = { - projectId: window.location.hash.substring(1) || '10015059' + projectId: window.location.hash.substring(1) || DEFAULT_PROJECT_ID }; } componentDidMount () { window.addEventListener('hashchange', this.updateProject); + if (!window.location.hash.substring(1)) { + window.location.hash = DEFAULT_PROJECT_ID; + } } componentWillUnmount () { window.addEventListener('hashchange', this.updateProject);