Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mapDispatchToProps(dispatch: Dispatch<actions.Any>): IPropsFromDispatch {
- return {
- refreshRefsFromURL: (newURL: URL) => {
- dispatch(actions.refListInvalidate());
- dispatch(actions.setServerURL(newURL));
- fetch(urljoin(newURL + "/ref/"))
- .then((response) => response.json())
- .then((refs) => {
- dispatch(actions.refListEntriesAvailable(refs));
- // tslint:disable-next-line:no-console
- console.log("before");
- dispatch(actions.setSelectedHeadRefHash(refs[refs.length - 1].hash));
- // tslint:disable-next-line:no-console
- console.log("after"); // << I never get here
- })
- .catch((err) => console.error)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement