diff --git a/internal/http/html/static/templates/content/module_get.tmpl b/internal/http/html/static/templates/content/module_get.tmpl
index 45113da63..5b59ae83c 100644
--- a/internal/http/html/static/templates/content/module_get.tmpl
+++ b/internal/http/html/static/templates/content/module_get.tmpl
@@ -34,10 +34,10 @@
diff --git a/internal/module/web.go b/internal/module/web.go
index 652214c89..14b6bf71c 100644
--- a/internal/module/web.go
+++ b/internal/module/web.go
@@ -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 {