visionmedia/page.js — pull request #95 by bengourley (2014-03-25 17:25:02+00:00)
Title: Fix ctx.path not defaulting to '/' with empty path and #some-hash

This PR is submitted without tests, because with the current test set up I can't figure out a way to test this. It could do with the `new Context()` constructor being available…

The value of `ctx.path` is different for `new Context('')` and `new Context('#hash-component')`.

The first `ctx.path = /` and the second `ctx.path = ''`. This is because on line 199 the path defaults to `'/'` while the variable `path` still contains the hash. On line 212 the hash has been stripped and it is possible that it is now an empty string, so should default to `'/'` again.

I hope this makes sense and can get merged. Cheers.