forked from Mirrors/bubbletea
refactor: remove redundant nil check in `flush` (#812)
From the Go docs: "If the map is nil, the number of iterations is 0." [1] Therefore, an additional nil check for before the loop is unnecessary. [1]: https://go.dev/ref/spec#For_range Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
parent
b5e2519fea
commit
12f405723d
|
@ -208,10 +208,8 @@ func (r *standardRenderer) flush() {
|
|||
|
||||
// Merge the set of lines we're skipping as a rendering optimization with
|
||||
// the set of lines we've explicitly asked the renderer to ignore.
|
||||
if r.ignoreLines != nil {
|
||||
for k, v := range r.ignoreLines {
|
||||
skipLines[k] = v
|
||||
}
|
||||
for k, v := range r.ignoreLines {
|
||||
skipLines[k] = v
|
||||
}
|
||||
|
||||
// Paint new lines
|
||||
|
|
Loading…
Reference in New Issue