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 for undefined parent error #111

merged 2 commits into from Feb 10, 2017


None yet
3 participants
Copy link

hsdwayne commented Feb 8, 2017

This fixes the error discussed in this comment 74c4723#commitcomment-20790735

Wayne Choy Wayne Choy

hsdwayne referenced this pull request Feb 9, 2017

Add more detailed annotation.
Prior to this, all visualization would show would be `Babel`,
after this change we will have `Babel: <project-or-addon-name>`.
index.js Outdated
@@ -120,7 +120,7 @@ module.exports = {

_getBabelOptions: function() {
var parentName = typeof === "function" ? :;
var parentName = typeof this.parent !== 'undefined' ? (typeof === 'function' ? : : 'unknown';

This comment has been minimized.


rwjblue Feb 9, 2017


Maybe a slight tweak:

var parantName;
if (this.parent && typeof === 'function') {
  parentName =;
} else if (this.parent) {
  parentName =;

I find it hard to reason about nested ternaries...

Wayne Choy Wayne Choy
parentName =;

This comment has been minimized.


hsdwayne Feb 9, 2017

Author Contributor

@rwjblue Ok, how's this?

@rwjblue rwjblue merged commit 8f976a8 into babel:master Feb 10, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@Turbo87 Turbo87 added the bug label Oct 27, 2017

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