dont load messages if file does not exist
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 31s

This commit is contained in:
matst80
2024-11-09 12:17:35 +01:00
parent ab6908c0e2
commit a03f7d9f1d

View File

@@ -55,7 +55,7 @@ func loadMessages(grain Grain, id CartId) error {
var err error
path := getCartPath(id.String())
if _, err = os.Stat(path); errors.Is(err, os.ErrNotExist) {
return err
return nil
}
file, err := os.Open(path)
if err != nil {