Open kennethklee opened 8 months ago
When running this, value, _ = vm.Run("{}"), the resultant value is undefined instead of an Object.
value, _ = vm.Run("{}")
value
Other types work:
value, _ = vm.Run("1") // value.toString() is 1
value, _ = vm.Run("true") // value.toString() is true
value, _ = vm.Run("[1, 2, 3]") // value.toString() is 1, 2, 3
As an extension, an error is returned when using { "a": 1 }. Error: (anonymous): Line 1:5 Unexpected token :
{ "a": 1 }
(anonymous): Line 1:5 Unexpected token :
I think this is related to #430
When running this,
value, _ = vm.Run("{}")
, the resultantvalue
is undefined instead of an Object.Other types work:
As an extension, an error is returned when using
{ "a": 1 }
. Error:(anonymous): Line 1:5 Unexpected token :