New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the possibility to go back #124

Merged
merged 2 commits into from Dec 6, 2018

Conversation

Projects
None yet
3 participants
@axelssonHakan
Member

axelssonHakan commented Dec 5, 2018

The back button doesn't trigger a reload on its own?!

@netlify

This comment has been minimized.

netlify bot commented Dec 5, 2018

Deploy preview for catwalk ready!

Built with commit e877210

https://deploy-preview-124--catwalk.netlify.com

@hrigner

hrigner approved these changes Dec 5, 2018

Nice! One minor thing, the param to reload is optional and default false, so using reload() would be enough.

@axelssonHakan

This comment has been minimized.

Member

axelssonHakan commented Dec 5, 2018

Ignore this for now - need to switch to window.location.replace since "baseURL" changes isn't allowed for history.pushState

}
window.history.replaceState({}, '', `${window.location.pathname}?engine_url=${encodeURI(newURL)}`);
window.location.reload(false);
window.location.assign(`${protocol}${window.location.host}?engine_url=${encodeURI(newURL)}`);

This comment has been minimized.

@peol

peol Dec 5, 2018

Member

Is there anything wrong with location.href = <url>? :)

This comment has been minimized.

@axelssonHakan

axelssonHakan Dec 6, 2018

Member

No or YES :-)
Using window.location.assigns makes it possible to mock that function and not trigger unexpected test behaviours

@axelssonHakan axelssonHakan merged commit 69e0387 into master Dec 6, 2018

3 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
cla/verification CLA OK
deploy/netlify Deploy preview ready!
Details

@axelssonHakan axelssonHakan deleted the enableBackButton branch Dec 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment