bugfix: hot-fix for blank pages on some routes #866
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
as noted in #865 you get a blank page when visiting pages like:
The immediate cause for the bug is the "Edit on Github" button breaking the page:
From my findings something is causing these page to render twice, the first time
model.project.id
isundefined
for some reason. This causes the latest version check in the conditional to break. Imo avoiding this initial render would be the optimal fix so if anyone has an idea whats causing it that would be good!For now I suggest a hot fix to check if
model.project.id
exists before rendering the component as well asmodel.file
andmodel.line
since they are also undefined for some reason. The component shouldn't be rendered anyways if any of these are undefined since it will just be a dead link.