Skip to content

Conversation

@benvinegar
Copy link
Contributor

No description provided.

src/raven.js Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use isUndefined(document)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought – isUndefined is declared halfway through the file, and I like the declaration of hasDocument at the very top in that big var statement.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it gets hoisted, yo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it does, but it seems gross to assume that a function is hoisted on the very first JavaScript statement in a file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benvinegar benvinegar force-pushed the no-document branch 3 times, most recently from a59513e to 769ab0b Compare September 16, 2015 19:48
benvinegar added a commit that referenced this pull request Sep 16, 2015
Don't access document if undefined
@benvinegar benvinegar merged commit 4db9b1d into master Sep 16, 2015
@mattrobenolt mattrobenolt deleted the no-document branch October 22, 2015 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants