Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Commit

Permalink
fix: prevent modules with no published versions from crashing otf (#611)
Browse files Browse the repository at this point in the history
This PR prevent modules with no published versions from triggering a nil
panic.
  • Loading branch information
robbert229 committed Sep 28, 2023
1 parent c1ee8d8 commit 84aa299
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/module/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ func (h *webHandlers) get(w http.ResponseWriter, r *http.Request) {

switch module.Status {
case ModuleStatusSetupComplete:
readme = html.MarkdownToHTML(tfmod.readme)
if tfmod != nil {
readme = html.MarkdownToHTML(tfmod.readme)
}
}

h.Render("module_get.tmpl", w, struct {
Expand Down

0 comments on commit 84aa299

Please sign in to comment.