Skip to content

Commit

Permalink
Allow js storage write version to be undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
sesposito committed Oct 4, 2023
1 parent 068c8ad commit 3e27ee1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/runtime_javascript_nakama.go
Original file line number Diff line number Diff line change
Expand Up @@ -4498,7 +4498,7 @@ func jsArrayToStorageOpWrites(r *goja.Runtime, dataSlice []any) (StorageOpWrites
}
writeOp.Value = string(valueBytes)

if versionIn, ok := dataMap["version"]; ok {
if versionIn := dataMap["version"]; versionIn != nil {
version, ok := versionIn.(string)
if !ok {
return nil, errors.New("expects 'version' value to be a string")
Expand Down

0 comments on commit 3e27ee1

Please sign in to comment.