Skip to content
This repository was archived by the owner on Dec 15, 2018. It is now read-only.
This repository was archived by the owner on Dec 15, 2018. It is now read-only.

location state is not persisted for initial route #165

@gshively11

Description

@gshively11

https://github.com/FormidableLabs/redux-little-router/blob/master/src/enhancer.js#L34

The location returned by the history listener does not return state (and thus query) for the initial route. Reproduce using this flow:

  1. On a new tab, load a URL with at least one querystring value
  2. Perform an action on the page that results in a push to a new url with different query values
  3. Press the browser's back button

Expected: the query object should be available on the ROUTER_LOCATION_CHANGED action payload
Result: the query is an empty object (key is undefined and hash is an empty string as well).

I spent a little time trying to track down the root cause, but had to move onto other things, so reproduction steps is the best I can give you at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions