Skip to content

Commit d021eac

Browse files
committed
fix(editor): clear editor state on component mount
1 parent 83519b2 commit d021eac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/editor/components/GtfsEditor.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ export default class GtfsEditor extends Component {
6060
}
6161

6262
componentWillMount () {
63+
// Wipe any leftover state that may exist for other feed sources in editor.
64+
// NOTE: Clear GTFS content happens outside of onComponentMount function so
65+
// that it is only ever called on mount (onComponentMount is called after
66+
// a successful snapshot/import when starting from scratch).
67+
this.props.clearGtfsContent()
6368
this.props.onComponentMount(this.props)
6469
}
6570

0 commit comments

Comments
 (0)