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
1 changed files with 1 additions and 1 deletions

View File

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