robertkrimen / otto

A JavaScript interpreter in Go (golang)
http://godoc.org/github.com/robertkrimen/otto
MIT License
8.04k stars 584 forks source link

calling es5 js library error #532

Closed BinaryRyan closed 1 month ago

BinaryRyan commented 1 month ago
    vm := otto.New()
    _, err = vm.Run(`
            function(e, t, i) {
                Object.defineProperty(t, "__esModule", {
                    value: true
                });
                t.CircularList = undefined;
            }

    `)
    if err != nil {
        panic(err)
    }
panic: (anonymous): Line 2:9 Unexpected token ( (and 5 more errors) [recovered]
    panic: (anonymous): Line 2:9 Unexpected token ( (and 5 more errors)
stevenh commented 1 week ago

I assume you fixed the issue your side @BinaryRyan?