fix verbose mode panic with tui log capture (#174)

This commit is contained in:
Michael Quigley 2023-01-24 11:50:43 -05:00
parent 2a2a64f513
commit 54476d2cd1
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 2 additions and 2 deletions

View File

@ -181,7 +181,7 @@ func (m *accessModel) Write(p []byte) (n int, err error) {
lines := strings.Split(in, "\n")
for _, line := range lines {
cleanLine := strings.ReplaceAll(line, "\n", "")
if cleanLine != "" {
if cleanLine != "" && m.prg != nil {
m.prg.Send(accessLogLine(cleanLine))
}
}

View File

@ -204,7 +204,7 @@ func (m *shareModel) Write(p []byte) (n int, err error) {
lines := strings.Split(in, "\n")
for _, line := range lines {
cleanLine := strings.ReplaceAll(line, "\n", "")
if cleanLine != "" {
if cleanLine != "" && m.prg != nil {
m.prg.Send(shareLogLine(cleanLine))
}
}