dont load messages if file does not exist
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 31s
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 31s
This commit is contained in:
@@ -55,7 +55,7 @@ func loadMessages(grain Grain, id CartId) error {
|
|||||||
var err error
|
var err error
|
||||||
path := getCartPath(id.String())
|
path := getCartPath(id.String())
|
||||||
if _, err = os.Stat(path); errors.Is(err, os.ErrNotExist) {
|
if _, err = os.Stat(path); errors.Is(err, os.ErrNotExist) {
|
||||||
return err
|
return nil
|
||||||
}
|
}
|
||||||
file, err := os.Open(path)
|
file, err := os.Open(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user