Commit 65354807 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Correctly align optional parameters in JS runtime bindings.

parent 4290fa76
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr
- Fix devconsole counts when database statistics are not available.
- Generate missing username in runtime token generator.
- Improve JS runtime authoritative match filtered broadcasts to large sets of users.
- Correctly align optional parameters in JS runtime bindings.

## [3.11.0] - 2022-03-21
### Added
+6 −6
Original line number Diff line number Diff line
@@ -1125,8 +1125,8 @@ func (n *runtimeJavascriptNakamaModule) authenticateCustom(r *goja.Runtime) func
		}

		create := true
		if f.Argument(3) != goja.Undefined() {
			create = getJsBool(r, f.Argument(3))
		if f.Argument(2) != goja.Undefined() {
			create = getJsBool(r, f.Argument(2))
		}

		dbUserID, dbUsername, created, err := AuthenticateCustom(context.Background(), n.logger, n.db, id, username, create)
@@ -1176,8 +1176,8 @@ func (n *runtimeJavascriptNakamaModule) authenticateDevice(r *goja.Runtime) func
		}

		create := true
		if f.Argument(3) != goja.Undefined() {
			create = getJsBool(r, f.Argument(3))
		if f.Argument(2) != goja.Undefined() {
			create = getJsBool(r, f.Argument(2))
		}

		dbUserID, dbUsername, created, err := AuthenticateDevice(context.Background(), n.logger, n.db, id, username, create)
@@ -1478,8 +1478,8 @@ func (n *runtimeJavascriptNakamaModule) authenticateGoogle(r *goja.Runtime) func
		}

		create := true
		if f.Argument(1) != goja.Undefined() {
			create = getJsBool(r, f.Argument(1))
		if f.Argument(2) != goja.Undefined() {
			create = getJsBool(r, f.Argument(2))
		}

		dbUserID, dbUsername, created, err := AuthenticateGoogle(context.Background(), n.logger, n.db, n.socialClient, token, username, create)