New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move Native.Json import to be after all other imports #577

Merged
merged 1 commit into from Apr 28, 2016

Conversation

Projects
None yet
2 participants
@eeue56
Contributor

eeue56 commented Apr 28, 2016

Problem:

  • When importing Html, if you run it, sometimes you get the error
encodeArray: _elm_lang$core$Native_Array.toJSArray,
                                            ^

TypeError: Cannot read property 'toJSArray' of undefined

Solution:

  • Import Native.Json last, after Array, to ensure that Native.Array has been imported in the right order

Other notes:

  • The problem mentioned in the gist is slightly weird. It only happens for things which have default repo urls. I don't know why that would affect it, but this makes it work for all cases.
  • You can force the Array to be included before Json.Decode by doing this change too, but better to fix it at a library level

@evancz evancz merged commit 68e28c7 into elm:master Apr 28, 2016

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Apr 28, 2016

Member

Cool, thanks! Moved things such that people will download this version now. LMK if you see it again.

Member

evancz commented Apr 28, 2016

Cool, thanks! Moved things such that people will download this version now. LMK if you see it again.

@eeue56 eeue56 deleted the eeue56:patch-10 branch Apr 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment