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
No related branches found
No related tags found
1 merge request!109Project/haven beta
......@@ -398,7 +398,7 @@ func (r *RemoteKV) ListenOnRemoteKey(_ js.Value, args []js.Value) any {
cb := newKeyChangedByRemoteCallback(args[2])
localEvents := true
if !args[3].IsUndefined() {
if len(args) > 3 && !args[3].IsUndefined() {
localEvents = args[3].Bool()
}
......@@ -434,7 +434,7 @@ func (r *RemoteKV) ListenOnRemoteMap(_ js.Value, args []js.Value) any {
cb := newMapChangedByRemoteCallback(args[2])
localEvents := true
if !args[3].IsUndefined() {
if len(args) > 3 && !args[3].IsUndefined() {
localEvents = args[3].Bool()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment