Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Call the .Str method when we don't know how to stringify something
  • Loading branch information
pmurias committed Aug 16, 2015
1 parent c264dcc commit 6aedbc4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vm/js/nqp-runtime/runtime.js
Expand Up @@ -73,6 +73,8 @@ exports.to_str = function(arg, ctx) {
return arg;
} else if (arg !== undefined && arg !== null && arg.type_object_) {
return "";
} else if (arg.Str) {
return arg.Str(ctx);
} else {
console.log(arg);
throw "Can't convert to str";
Expand Down

0 comments on commit 6aedbc4

Please sign in to comment.