mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-05-15 14:38:03 +02:00
5c7eb23336
Clicking a markdown link into a subdirectory's README threw "Cannot read properties of undefined (reading 'sha')" and left the viewer on Loading…. The route handler called updateContent() without loading the new directory's file listing, so getSelectedFile() returned undefined and getContent() then dereferenced fileInfo.sha. Two fixes: - getContent() falls back to sha "0" when fileInfo is undefined. - The $routeUpdate handler walks the new path and loads any directory listings that aren't yet in $scope.files before rendering, so the selected file actually has its sha by the time we fetch. Fixes #510.