getbem.github.io
getbem.github.io copied to clipboard
Fix failed view load when url has an ID (#147)
This fix resolves the dead link bug described in issue https://github.com/getbem/getbem.com/issues/147
Currently, the url if statement is looking for a view that does not exist. This is because it is checking against the url post '/'. i.e. 'faq/#custom-tags-for-blocks' is interpreted as a page rather than the page '/faq' AND an anchor '#custom-tags-for-blocks'.
To solve this, we check to see if the URL contains an ID. If true, we remove the ID and load the appropriate view.