Skip to content

Commit 71147fd

Browse files
committed
syscall/js: corrected the wrong method name in error for Value.Length method
1 parent 261fe25 commit 71147fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/syscall/js/js.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ func makeArgs(args []any) ([]Value, []ref) {
362362
// It panics if v is not a JavaScript object.
363363
func (v Value) Length() int {
364364
if vType := v.Type(); !vType.isObject() {
365-
panic(&ValueError{"Value.SetIndex", vType})
365+
panic(&ValueError{"Value.Length", vType})
366366
}
367367
r := valueLength(v.ref)
368368
runtime.KeepAlive(v)

0 commit comments

Comments
 (0)