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

Fix error logging for non-browser environments. #69

Merged
merged 1 commit into from Dec 29, 2014

Conversation

Projects
None yet
2 participants
@laszlopandy
Contributor

laszlopandy commented Dec 29, 2014

Two things:

  1. e was changed to error because e doesn't exist.
  2. We check the existence of actual method appendChild, not a proxy (if document exists). Because it is possible that we are in an environment with a document but still initialized by Elm.worker, which gives {} for container.
if (typeof document === 'undefined') {
console.log(e.message);
throw error;
if (typeof container.appendChild == 'undefined') {

This comment has been minimized.

@evancz

evancz Dec 29, 2014

Member

Why double equals?

@evancz

evancz Dec 29, 2014

Member

Why double equals?

evancz pushed a commit that referenced this pull request Dec 29, 2014

Merge pull request #69 from laszlopandy/error-log-fix
Fix error logging for non-browser environments.

@evancz evancz merged commit 0aaafb9 into elm:master Dec 29, 2014

1 check failed

continuous-integration/travis-ci The Travis CI build failed
Details
@laszlopandy

This comment has been minimized.

Show comment
Hide comment
@laszlopandy

laszlopandy Dec 29, 2014

Contributor

Sorry, it should be triple equals.

On Monday, December 29, 2014, Evan Czaplicki notifications@github.com
wrote:

Merged #69 https://github.com/elm-lang/core/pull/69.


Reply to this email directly or view it on GitHub
https://github.com/elm-lang/core/pull/69#event-212397505.

Contributor

laszlopandy commented Dec 29, 2014

Sorry, it should be triple equals.

On Monday, December 29, 2014, Evan Czaplicki notifications@github.com
wrote:

Merged #69 https://github.com/elm-lang/core/pull/69.


Reply to this email directly or view it on GitHub
https://github.com/elm-lang/core/pull/69#event-212397505.

@laszlopandy laszlopandy deleted the laszlopandy:error-log-fix branch Jan 5, 2015

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