Commit b70892d6 authored by Christoph Häfner's avatar Christoph Häfner

Fix MovieCompareFinish component

Horrible hack inside :(
parent 0c94f3fe
Pipeline #457 passed with stages
in 11 minutes and 8 seconds
......@@ -32,7 +32,14 @@ export default class MovieCompareFinish extends React.Component {
}
startEmptyProcess() {
this.dispatch(Actions.startEmptyProcess(this.props.collectionId));
// Horrible hack:
// for an unknown reason the personalMovieList property is not yet updated with the just finished comparison process
// hence we need to increase it by one, because we know we just called finishComparisonProcess befor :(
const newPersonalMovieListLength = this.props.rate.personalMovieList.length + 1;
this.dispatch(Actions.startEmptyProcess({
id: this.props.collectionId,
personalMovieListLength: newPersonalMovieListLength
}));
}
render() {
......
......@@ -13,7 +13,8 @@ describe("MovieCompareFinish", () => {
movieFromCollection: '11',
result: 0
}
}
},
personalMovieList: []
},
movieCollections: {
'42': {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment