From 7e0c0af152ce565858de1f86475f69eb4b18ddc7 Mon Sep 17 00:00:00 2001 From: "Richard T. Carback III" <rick.carback@gmail.com> Date: Wed, 14 Jun 2023 17:42:43 +0000 Subject: [PATCH] Fix build issues --- wasm/collective.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wasm/collective.go b/wasm/collective.go index 4e051da2..7abdcbd7 100644 --- a/wasm/collective.go +++ b/wasm/collective.go @@ -472,7 +472,7 @@ func (r *RemoteKV) ListenOnRemoteMap(_ js.Value, args []js.Value) any { // GetAllRemoteKeyListeners returns a JSON list of { key: [id, id, id, ...] }, // where key is the key for the listener and the list is an list of integer ids // of each listener. -func (r *RemoteKV) GetAllRemoteKeyListeners() any { +func (r *RemoteKV) GetAllRemoteKeyListeners(_ js.Value, args []js.Value) any { return r.api.GetAllRemoteKeyListeners() } @@ -498,18 +498,18 @@ func (r *RemoteKV) DeleteRemoteKeyListener(_ js.Value, args []js.Value) any { promiseFn := func(resolve, reject func(args ...any) js.Value) { err := r.api.DeleteRemoteKeyListener(key, id) if err != nil { - reject(execption.NewTrace(err)) + reject(exception.NewTrace(err)) } else { resolve() } } - return utils.CreatePromiseFn(promisFn) + return utils.CreatePromise(promiseFn) } // GetAllRemoteMapListeners returns a JSON list of { key: [id, id, id, ...] }, // where key is the key for the listener and the list is an list of integer ids // of each listener. -func (r *RemoteKV) GetAllRemoteMapListeners() any { +func (r *RemoteKV) GetAllRemoteMapListeners(_ js.Value, args []js.Value) any { return r.api.GetAllRemoteMapListeners() } @@ -535,12 +535,12 @@ func (r *RemoteKV) DeleteRemoteMapListener(_ js.Value, args []js.Value) any { promiseFn := func(resolve, reject func(args ...any) js.Value) { err := r.api.DeleteRemoteMapListener(mapName, id) if err != nil { - reject(execption.NewTrace(err)) + reject(exception.NewTrace(err)) } else { resolve() } } - return utils.CreatePromiseFn(promisFn) + return utils.CreatePromise(promiseFn) } //////////////////////////////////////////////////////////////////////////////// -- GitLab