mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-10-10 14:16:41 +03:00
Check for error in subscription and update Tea dependency
This commit is contained in:
@@ -90,7 +90,10 @@ func cursor(s string, blink bool) string {
|
||||
|
||||
// Subscription
|
||||
func Blink(model tea.Model) tea.Msg {
|
||||
m, _ := model.(Model)
|
||||
m, ok := model.(Model)
|
||||
if !ok {
|
||||
return tea.NewErrMsg("could not assert given model to the model we expected; make sure you're passing as input model")
|
||||
}
|
||||
time.Sleep(m.BlinkSpeed)
|
||||
return CursorBlinkMsg{}
|
||||
}
|
||||
|
Reference in New Issue
Block a user