Reset editor when entering new document view

This commit is contained in:
Jori Lallo
2016-06-05 19:31:08 -07:00
parent 984140c3ca
commit 3b09d85da8
2 changed files with 8 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ const cx = classNames.bind(styles);
class DocumentEdit extends Component {
componentDidMount = () => {
// This is a bit hacky, should find a better way
store.reset();
if (this.props.route.newDocument) {
store.atlasId = this.props.params.id;
store.newDocument = true;