Closed
Description
I ran into this one when trying to use Go functions that are callable from JavaScript code.
Playground link:
http://www.gopherjs.org/playground/#/A_bP7IWgxi
Basically, $internalize has no code path for 'undefined' values that are mapped to interfaces.
I would like to recommend the following fix, for line 245 in compiler/prelude/jsmapping.go like so:
if (v === null || v === undefined) {
return $ifaceNil;
}
This changes $internalize such that undefined is converted to nil, just like null, for interfaces.
Metadata
Metadata
Assignees
Labels
No labels