Skip to content

Commit

Permalink
fix: fileLocation.endsWith is not a function
Browse files Browse the repository at this point in the history
closes #53
  • Loading branch information
juancarlosfarah committed May 2, 2019
1 parent 1b4211a commit 17dfa76
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/LoadSpace.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,16 @@ class LoadSpace extends Component {
this.setState({ open: false });
};

handleFileLocation = selectedPath => {
this.setState({ fileLocation: selectedPath });
handleFileLocation = event => {
const fileLocation = event.target.value;
this.setState({ fileLocation });
};

handleLoad = () => {
const { fileLocation } = this.state;
const { dispatchLoadSpace } = this.props;
dispatchLoadSpace({ fileLocation });
this.handleFileLocation('');
this.setState({ fileLocation });
};

handleBrowse = () => {
Expand All @@ -81,6 +82,7 @@ class LoadSpace extends Component {
render() {
const { classes, theme, activity } = this.props;
const { open, fileLocation } = this.state;

if (activity) {
return (
<div className={classNames(classes.root, 'LoadSpace')}>
Expand Down

0 comments on commit 17dfa76

Please sign in to comment.