fix: initialize extra prompt when nil

resolves #1979
This commit is contained in:
Jan De Dobbeleer 2022-03-24 21:00:12 +01:00 committed by Jan De Dobbeleer
parent 035134a79a
commit 79035aafa9

View file

@ -294,7 +294,7 @@ func (e *Engine) PrintExtraPrompt(promptType ExtraPromptType) string {
prompt = e.Config.SecondaryPrompt
}
if prompt == nil {
return ""
prompt = &ExtraPrompt{}
}
getTemplate := func(template string) string {
if len(template) != 0 {