Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 5a644de

Browse files
fixed broken back button!
1 parent f664d1d commit 5a644de

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/stream-store/actions.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ actions.get.response.subscribe(({ url }) => history.push(url));
2525
const getUrl = location =>
2626
`${location.pathname}${location.search}${location.hash}`;
2727

28-
history.listen(
29-
(location, action) =>
30-
action === 'POP' &&
31-
actions.get.response.next({ url: getUrl(location), headers: {} }),
32-
);
28+
history.listen((location, action) => {
29+
if (action !== 'POP') {
30+
return;
31+
}
32+
actions.get.request.next({ link: { href: getUrl(location) }, headers: {} });
33+
});
3334

3435
export default actions;

0 commit comments

Comments
 (0)