summaryrefslogtreecommitdiff
path: root/cache
diff options
context:
space:
mode:
authorewy <ewy0@protonmail.com>2026-05-16 19:06:24 +0200
committerewy <ewy0@protonmail.com>2026-05-16 19:06:24 +0200
commit00379affbb5f8483fcda9bcf2291106fac574110 (patch)
tree6659535afe2e244a65bc17b1b71047e28b07a662 /cache
parente24077dcfa5e40d2c7888ff3cb4c10626e0e8c2c (diff)
fix bug :(
Diffstat (limited to 'cache')
-rw-r--r--cache/cache.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cache/cache.go b/cache/cache.go
index b4cd989..9e6b1bc 100644
--- a/cache/cache.go
+++ b/cache/cache.go
@@ -139,6 +139,9 @@ func Insert(in *model.State) error {
}
insert := New(in)
result := loaded.Merge(insert)
+ if loaded == nil {
+ return SaveFile(Path, result)
+ }
if slices.Equal(loaded.Entries, result.Entries) {
return nil
}