diff --git a/internal/web/app.wasm b/internal/web/app.wasm index 5fbb1c9..c191bc8 100755 --- a/internal/web/app.wasm +++ b/internal/web/app.wasm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd33c8166e24934aa8fb5e75d47fae78adfe88acb6596df56fe8f5b078900b9e -size 28571927 +oid sha256:4f36963d6c7744e1a470336f6b0ed62360d43baa4451672e6e2cdce4b6333507 +size 28571892 diff --git a/state.go b/state.go index e79e9d2..d4ae2c1 100644 --- a/state.go +++ b/state.go @@ -30,7 +30,11 @@ func (s *State) GetIndex(name string) int { s.RLock() defer s.RUnlock() - return s.Indicies[name] + index, ok := s.Indicies[name] + if !ok { + return -1 // -1 is a special value meaning start from the beginning + } + return index } func (s *State) SetIndex(name string, index int) {