Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix externalizeFunction to also copyInterfaceVal for returned struct
vals
  • Loading branch information
myitcv committed Apr 21, 2018
commit a1b88e1e2346d82dec6cc06acbd368aa91b65f39
4 changes: 2 additions & 2 deletions compiler/prelude/jsmapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ var $externalizeFunction = function(v, t, passThis) {
case 0:
return;
case 1:
return $externalize(result, t.results[0]);
return $externalize($copyInterfaceVal(result), t.results[0]);
default:
for (var i = 0; i < t.results.length; i++) {
result[i] = $externalize(result[i], t.results[i]);
result[i] = $externalize($copyInterfaceVal(result[i]), t.results[i]);
}
return result;
}
Expand Down