Skip to content

Commit 91be9d3

Browse files
committed
Fix externalizeFunction to also copyInterfaceVal for returned struct
vals
1 parent e53e1a6 commit 91be9d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/prelude/jsmapping.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ var $externalizeFunction = function(v, t, passThis) {
163163
case 0:
164164
return;
165165
case 1:
166-
return $externalize(result, t.results[0]);
166+
return $externalize($copyInterfaceVal(result), t.results[0]);
167167
default:
168168
for (var i = 0; i < t.results.length; i++) {
169-
result[i] = $externalize(result[i], t.results[i]);
169+
result[i] = $externalize($copyInterfaceVal(result[i]), t.results[i]);
170170
}
171171
return result;
172172
}

0 commit comments

Comments
 (0)