From a498b857d6c665494a1c74892cc88e5c29eb6484 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Fri, 16 Oct 2020 14:36:08 -0400 Subject: [PATCH] Update paginator for bubbletea 0.12.0 --- paginator/paginator.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/paginator/paginator.go b/paginator/paginator.go index d3c17b0..7c0b0da 100644 --- a/paginator/paginator.go +++ b/paginator/paginator.go @@ -164,11 +164,7 @@ func Update(msg tea.Msg, m Model) (Model, tea.Cmd) { } // View renders the pagination to a string. -func View(model tea.Model) string { - m, ok := model.(Model) - if !ok { - return "could not perform assertion on model" - } +func View(m Model) string { switch m.Type { case Dots: return dotsView(m)