Loading CHANGELOG.md +2 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ All notable changes to this project are documented below. The format is based on [keep a changelog](http://keepachangelog.com) and this project uses [semantic versioning](http://semver.org). ## [Unreleased] ### Changed - JS localcachePut now only accepts primitive types, other values will throw an error. ## [3.19.0] 2023-11-11 ### Added Loading server/runtime_javascript_nakama.go +9 −1 Original line number Diff line number Diff line Loading @@ -8004,7 +8004,15 @@ func (n *runtimeJavascriptNakamaModule) localcachePut(r *goja.Runtime) func(goja panic(r.NewTypeError("ttl must be 0 or more")) } n.localCache.Put(key, value.Export(), ttl) v := value.Export() switch v.(type) { case string, int64, float64, bool: default: panic(r.NewTypeError("unsupported value type: must be string, numeric or boolean")) } n.localCache.Put(key, v, ttl) return goja.Undefined() } Loading Loading
CHANGELOG.md +2 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ All notable changes to this project are documented below. The format is based on [keep a changelog](http://keepachangelog.com) and this project uses [semantic versioning](http://semver.org). ## [Unreleased] ### Changed - JS localcachePut now only accepts primitive types, other values will throw an error. ## [3.19.0] 2023-11-11 ### Added Loading
server/runtime_javascript_nakama.go +9 −1 Original line number Diff line number Diff line Loading @@ -8004,7 +8004,15 @@ func (n *runtimeJavascriptNakamaModule) localcachePut(r *goja.Runtime) func(goja panic(r.NewTypeError("ttl must be 0 or more")) } n.localCache.Put(key, value.Export(), ttl) v := value.Export() switch v.(type) { case string, int64, float64, bool: default: panic(r.NewTypeError("unsupported value type: must be string, numeric or boolean")) } n.localCache.Put(key, v, ttl) return goja.Undefined() } Loading