updated jsvm types

This commit is contained in:
Gani Georgiev
2025-06-17 21:23:19 +03:00
parent 262e78c04e
commit c8776b7cd9
4 changed files with 3031 additions and 3019 deletions

View File

@@ -313,7 +313,7 @@ func baseBinds(vm *goja.Runtime) {
vm.Set("toBytes", func(raw any, maxReaderBytes int) ([]byte, error) {
switch v := raw.(type) {
case nil:
return nil, nil
return []byte{}, nil
case string:
return []byte(v), nil
case []byte: