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,11 +208,9 @@ func (r *standardRenderer) flush() {
|
||||||
|
|
||||||
// Merge the set of lines we're skipping as a rendering optimization with
|
// 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.
|
// the set of lines we've explicitly asked the renderer to ignore.
|
||||||
if r.ignoreLines != nil {
|
|
||||||
for k, v := range r.ignoreLines {
|
for k, v := range r.ignoreLines {
|
||||||
skipLines[k] = v
|
skipLines[k] = v
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Paint new lines
|
// Paint new lines
|
||||||
for i := 0; i < len(newLines); i++ {
|
for i := 0; i < len(newLines); i++ {
|
||||||
|
|
Loading…
Reference in New Issue