From 6192a1e9ccd8487c00c30d29277ecbead07d3276 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Thu, 25 Jul 2024 20:37:09 -0400 Subject: [PATCH] Fixed util.Memo --- internal/util/util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/util/util.go b/internal/util/util.go index 58caf97..8b28935 100644 --- a/internal/util/util.go +++ b/internal/util/util.go @@ -83,6 +83,7 @@ func NewMemo[T any] (update func () T) Memo[T] { func (this *Memo[T]) Value () T { if !this.valid { this.cache = this.update() + this.valid = true } return this.cache }