Skip to content

Instantly share code, notes, and snippets.

@dilijev
Last active March 10, 2016 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dilijev/8946d28ce487a85bbdd1 to your computer and use it in GitHub Desktop.
Save dilijev/8946d28ce487a85bbdd1 to your computer and use it in GitHub Desktop.
Undefined URLs in navigation

Affects:

  • Edge 25.10586.0.0 and IE on Windows 10 (Version 1511 (OS Build 10586.104)).
  • No repro in Chrome 48
  • No repro in Firefox 44

Repro steps:

  1. Start at URL from list below, e.g.: https://github.com/defunkt/jquery-pjax
  2. Click script directory (or click CONTRIBUTING.md file, etc.)
  3. Click back button in browser (or use Alt+Left to go back)
  4. See the URL is now set to owner/undefined: https://github.com/defunkt/undefined

Bonus: Navigating one step further back and then forward again results in 404 because the incorrect URL is added to the forward history list.

Repo URLs where bug is observed:

Hypotheses: Error has to do with a code path where there are hyphens in the repo name. Does not seem affected by whether or not there are spaces in the path name, or whether the path is to a directory or file. The undefined in the URL name suggests it is a JS issue, not a browser issue.

e.g. compare navigating from:

with navigating from:

(Same results regardless of space in the path and regardless of whether navigation was to a file or folder URL.)

Also only affects navigation back to the repo root. Navigating another layer into the code explorer and back does not show an undefined URL.

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