File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ func (self *JSRE) PrettyPrint(v interface{}) (val otto.Value, err error) {
297
297
return method .Call (method , v )
298
298
}
299
299
300
- // creates an otto value from a go type
300
+ // creates an otto value from a go type (serialized version)
301
301
func (self * JSRE ) ToValue (v interface {}) (otto.Value , error ) {
302
302
done := make (chan bool )
303
303
req := & evalReq {
@@ -311,9 +311,10 @@ func (self *JSRE) ToValue(v interface{}) (otto.Value, error) {
311
311
return req .res .result , req .res .err
312
312
}
313
313
314
+ // creates an otto value from a go type (non-serialized version)
314
315
func (self * JSRE ) ToVal (v interface {}) otto.Value {
315
316
316
- result , err := self .ToValue (v )
317
+ result , err := self .vm . ToValue (v )
317
318
if err != nil {
318
319
fmt .Println ("Value unknown:" , err )
319
320
return otto .UndefinedValue ()
You can’t perform that action at this time.
0 commit comments