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
I'm hacking on an Electron project which I'm trying to use elm for. In the electron code, one of my dependencies uses vm.runInNewContext which causes that code to have a different Array prototype which causes elm's instanceof checks to fail (see nodejs/node-v0.x-archive#1277).
Can elm use Arrays.isArray instead of instanceof checks?
Unfortunately this is only one of many ways people can mess up the global execution environment in a way that could mess Elm up. Monkey patching is and always has been caveat emptor.
I think we should leave the current behavior as-is on this one.
I'm hacking on an Electron project which I'm trying to use elm for. In the electron code, one of my dependencies uses
vm.runInNewContext
which causes that code to have a different Array prototype which causes elm'sinstanceof
checks to fail (see nodejs/node-v0.x-archive#1277).Can elm use Arrays.isArray instead of instanceof checks?
It looks like it's probably just a matter of editing https://github.com/elm-lang/elm-compiler/blob/a9658ccb44cf3358991671b7abe02c4d87a31151/src/Generate/JavaScript/Port.hs#L87 and possibly adding a new helper. But I'm very new to elm (and don't have a great grounding in JS stuff anyway), so I figured I'd raise the issue before I sent a pull request.
The text was updated successfully, but these errors were encountered: