Skip to content

Commit

Permalink
Properly render the page if no input root can be found
Browse files Browse the repository at this point in the history
In that case {{with .InputRoot.FileSystemAccessProfileReference}} would
cause a nil dereference. Split this up into two separate checks.
  • Loading branch information
EdSchouten committed Dec 21, 2023
1 parent 794e380 commit c2f1079
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/bb_browser/templates/page_action.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h2 class="my-4">Result</h2>
The action result of this action could not be found.
{{end}}

<h2 class="my-4">Input files{{if .Action}}<sup><a class="text-decoration-none" href="../../directory/{{.Action.InputRootDigest.Hash}}-{{.Action.InputRootDigest.SizeBytes}}/{{with .InputRoot.FileSystemAccessProfileReference}}?file_system_access_profile={{proto_to_json .}}{{end}}">*</a></sup>{{end}}</h2>
<h2 class="my-4">Input files{{if .Action}}<sup><a class="text-decoration-none" href="../../directory/{{.Action.InputRootDigest.Hash}}-{{.Action.InputRootDigest.SizeBytes}}/{{with .InputRoot}}{{with .FileSystemAccessProfileReference}}?file_system_access_profile={{proto_to_json .}}{{end}}{{end}}">*</a></sup>{{end}}</h2>

{{if .InputRoot}}
{{template "view_directory.html" .InputRoot}}
Expand Down

0 comments on commit c2f1079

Please sign in to comment.