default severity to under maintenance to guard nils

This commit is contained in:
steveoh 2017-08-29 09:32:11 -06:00
parent 6dd1d6ab05
commit 977be66adc

View File

@ -6,9 +6,10 @@
<div class="incident-description">
{{- .Content -}}
</div>
{{- $alert := index .Site.Data.severity.alerts .Params.severity -}}
{{- $severity := .Params.severity | default "under-maintenance" -}}
{{- $alert := index .Site.Data.severity.alerts $severity -}}
<p class="incident-status color-{{ $alert }}">
{{ index .Site.Data.severity.descriptions .Params.severity }}
{{ index .Site.Data.severity.descriptions $severity }}
</p>
</div>