try to use getState

This commit is contained in:
Maren Süwer
2018-09-25 13:18:59 +02:00
parent e38275259f
commit e3c7f50797
2 changed files with 2 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ class ChangesetView extends React.Component<State, Props> {
const { fetchChangesetIfNeeded, repository } = this.props;
const id = this.props.match.params.id;
//state macht keinen Sinn?! repositories holen!
fetchChangesetIfNeeded(repository.namespace, repository.name, id);
fetchChangesetIfNeeded(null, repository.namespace, repository.name, id);
}
render() {

View File

@@ -37,7 +37,7 @@ export function fetchChangesetIfNeeded(
repoName: string,
id: string
) {
return function(dispatch: any, getState) {
return (dispatch: any, getState: any) => {
console.log(getState());
if (shouldFetchChangeset(getState(), namespace, repoName, id)) {
return dispatch(fetchChangeset(namespace, repoName, id));