From b2810ed8f87d33e46d93d1f9b32f77850d758895 Mon Sep 17 00:00:00 2001 From: Andrei Mihu Date: Tue, 16 Nov 2021 19:09:50 +0000 Subject: [PATCH] Fix parsing edge case in TypeScript/JavaScript runtime storage delete operations. --- CHANGELOG.md | 1 + server/runtime_javascript_nakama.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be0fd94bf..1c0f82a2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr - Gracefully close Lua matches when call queue fills up. - Better handling for Lua runtime wallet update operation errors. - Fix handling of leaderboard record writes that do not need to update the database. +- Fix parsing edge case in TypeScript/JavaScript runtime storage delete operations. ## [3.9.0] - 2021-10-29 ### Added diff --git a/server/runtime_javascript_nakama.go b/server/runtime_javascript_nakama.go index ab64df923..b7bce33d0 100644 --- a/server/runtime_javascript_nakama.go +++ b/server/runtime_javascript_nakama.go @@ -3623,8 +3623,8 @@ func (n *runtimeJavascriptNakamaModule) storageDelete(r *goja.Runtime) func(goja objectID.Key = key } - if userID, ok := dataMap["userId"]; ok { - userIDStr, ok := userID.(string) + if uid, ok := dataMap["userId"]; ok { + userIDStr, ok := uid.(string) if !ok { panic(r.NewTypeError("expects 'userId' value to be a string")) } -- GitLab