Skip to content
Snippets Groups Projects
Commit 7ddefcd3 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

check args length

parent 7c2aca68
Branches
Tags
1 merge request!109Project/haven beta
...@@ -398,7 +398,7 @@ func (r *RemoteKV) ListenOnRemoteKey(_ js.Value, args []js.Value) any { ...@@ -398,7 +398,7 @@ func (r *RemoteKV) ListenOnRemoteKey(_ js.Value, args []js.Value) any {
cb := newKeyChangedByRemoteCallback(args[2]) cb := newKeyChangedByRemoteCallback(args[2])
localEvents := true localEvents := true
if !args[3].IsUndefined() { if len(args) > 3 && !args[3].IsUndefined() {
localEvents = args[3].Bool() localEvents = args[3].Bool()
} }
...@@ -434,7 +434,7 @@ func (r *RemoteKV) ListenOnRemoteMap(_ js.Value, args []js.Value) any { ...@@ -434,7 +434,7 @@ func (r *RemoteKV) ListenOnRemoteMap(_ js.Value, args []js.Value) any {
cb := newMapChangedByRemoteCallback(args[2]) cb := newMapChangedByRemoteCallback(args[2])
localEvents := true localEvents := true
if !args[3].IsUndefined() { if len(args) > 3 && !args[3].IsUndefined() {
localEvents = args[3].Bool() localEvents = args[3].Bool()
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment