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

<base href="..."> ignored #62

Closed
PixnBits opened this issue Nov 30, 2015 · 5 comments
Closed

<base href="..."> ignored #62

PixnBits opened this issue Nov 30, 2015 · 5 comments

Comments

@PixnBits
Copy link

It appears that the initial state looks at only the current location without regard to a <base> tag being present (value available in document.baseURI).

Is this correct? Is this a use case (webapp at a level other than domain-level) desired to be solved by this package?

@kimjoar
Copy link
Collaborator

kimjoar commented Dec 3, 2015

I've never used the <base> tag, so not sure what we need to think about there, but could you test your code with master? Quite a few changes to how we handle the location, might be it helps.

If you're using npm, you can test master with:

"redux-simple-router": "https://github.com/jlongster/redux-simple-router.git#master"

@jlongster
Copy link
Member

I think it's bad that we look directly at window.location, because we're supposed to just be looking at the history object. The problem is the API is a little awkward right now: there is no getCurrentLocation for various reasons, but the listen function is called immediately the first time it registers with the initial location.

I've mentioned this in another thread (don't have the link) but we should probably just reset the initial state with the first location we're given. Then we're just inheriting whatever behavior history has. Whether or not it supports base is an issue that can be talked about there.

@ellbee
Copy link
Member

ellbee commented Dec 3, 2015

I think this may be it: #38 (comment)

@kimjoar
Copy link
Collaborator

kimjoar commented Dec 3, 2015

@jlongster Master no longer relies on window.location, only on the location received from history.listen. Might help, but never needed <base>, so not sure.

@PixnBits
Copy link
Author

PixnBits commented Dec 5, 2015

Fantastic, looks to be working! I'm looking forward to the next release 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants