1
0
mirror of https://github.com/golang/go synced 2024-11-24 23:37:56 -07:00

syscall/js: corrected the wrong method name in error for Value.Length method

This commit is contained in:
mike andrews 2023-02-13 13:11:56 -05:00
parent 261fe25c83
commit 71147fd7a9

View File

@ -362,7 +362,7 @@ func makeArgs(args []any) ([]Value, []ref) {
// It panics if v is not a JavaScript object. // It panics if v is not a JavaScript object.
func (v Value) Length() int { func (v Value) Length() int {
if vType := v.Type(); !vType.isObject() { if vType := v.Type(); !vType.isObject() {
panic(&ValueError{"Value.SetIndex", vType}) panic(&ValueError{"Value.Length", vType})
} }
r := valueLength(v.ref) r := valueLength(v.ref)
runtime.KeepAlive(v) runtime.KeepAlive(v)