You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@lambdor found a bug with arrays when using ports: xash/Array#2
The problem is, that the compiler uses instanceof Array to check if an object is an JSArray with ports, but also var Array = Elm.Array.make(_elm); for using the module in the code, so the first one will crash. I don't know if Array is the only problematic module, or if there are more to find. However, there seem to be three solutions:
1.) Rename Array and forbid its and eventually other names for modules.
2.) Change var Module = Elm.Module.make(_elm); to something like _Module.
3.) Export an array identifier function to Utils to use it with _U.isArray(o); and fix eventually other conflicts, when they show up.
The text was updated successfully, but these errors were encountered:
@lambdor found a bug with arrays when using ports: xash/Array#2
The problem is, that the compiler uses
instanceof Array
to check if an object is an JSArray with ports, but alsovar Array = Elm.Array.make(_elm);
for using the module in the code, so the first one will crash. I don't know if Array is the only problematic module, or if there are more to find. However, there seem to be three solutions:1.) Rename Array and forbid its and eventually other names for modules.
2.) Change
var Module = Elm.Module.make(_elm);
to something like_Module
.3.) Export an array identifier function to Utils to use it with
_U.isArray(o);
and fix eventually other conflicts, when they show up.The text was updated successfully, but these errors were encountered: