We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
function updateSlug()
location.pathname.slice(-32)
fruitionsite/worker.js
Line 222 in 5bc77e0
↑↑↑ Here in this line for function getPage(), the slice causes slug to misbehave in specific cases where slug might be more than that length.
function getPage()
slice
slug
Case in Point:
> PAGE_TO_SLUG {something-something-0d44ee0e01944fabbb047c7bb9f885fd: "demo3", 4569ee8b29d64be6b8cb25be1f9123b0: "demo2"}
Here demo2 gets history.replaceState correctly, but, demo3 doesn't!
history.replaceState
Simply changing the function to :
function getPage() { return location.pathname.slice(1); }
should work.
The text was updated successfully, but these errors were encountered:
Issue stephenou#58 : Update getPage() to have .slice(1)
getPage()
.slice(1)
6b86774
Currently `getPage` returns `location.pathname.slice(-32)` This raises `slug` to not found when the pathname is longer
Create worker.js for Cloudflare workers
032e924
Included stephenou/fruitionsite#58
No branches or pull requests
fruitionsite/worker.js
Line 222 in 5bc77e0
↑↑↑ Here in this line for
function getPage()
, theslice
causesslug
to misbehave in specific cases whereslug
might be more than that length.Case in Point:
Here demo2 gets
history.replaceState
correctly, but, demo3 doesn't!Simply changing the function to :
should work.
The text was updated successfully, but these errors were encountered: