diff options
Diffstat (limited to 'ethereum/repl_darwin.go')
-rw-r--r-- | ethereum/repl_darwin.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ethereum/repl_darwin.go b/ethereum/repl_darwin.go index 87da3df1d..1b98c2150 100644 --- a/ethereum/repl_darwin.go +++ b/ethereum/repl_darwin.go @@ -8,7 +8,6 @@ package main import "C" import ( - "github.com/robertkrimen/otto" "strings" "unsafe" ) @@ -87,7 +86,10 @@ L: } } -func (self *JSRepl) PrintValue(value otto.Value) { +func (self *JSRepl) PrintValue(v interface{}) { method, _ := self.re.vm.Get("prettyPrint") - method.Call(method, value) + v, err := self.re.vm.ToValue(v) + if err == nil { + method.Call(method, v) + } } |