Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

fix(listener): Fixed bug with listening for store changes #23

Merged
merged 1 commit into from
Sep 16, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function connectRouterActions(router: Router, store: Store<any>) {
}

export function listenForStoreChanges(router: Router, store: Store<any>) {
const storeAndRouter$ = withLatestFrom.call(store, getLatestUrl(router));
const storeAndRouter$ = withLatestFrom.call(selectRouter(store), getLatestUrl(router));
const mismatch$ = filter.call(storeAndRouter$, ([ rs, url ]) => rs.path !== url);
const newPath$ = map.call(mismatch$, ([ rs ]) => rs.path);

Expand Down