Skip to content
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

Convert global 'this' references to 'global' before transpiling #25

Merged
merged 2 commits into from Feb 16, 2018

Conversation

sgtcoolguy
Copy link
Contributor

This adds a very simple babel plugin to convert global this references to global references in advance of transpilation (which would otherwise convert them to undefined). There's a unit test added to confirm the fix.

Relates to:

Copy link
Contributor

@ewanharris ewanharris left a comment

Choose a reason for hiding this comment

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

LGTM

Built and ran through KitchenSink-v2 on Android, iOS and Windows, runs as expected. No problems seen and the app functions as expected

Would like to note that it appears that Uncaught TypeError: Cannot read property '_' of undefined never actually occurred on Windows as I had no issues running KS on Windows with 7.1.0 and transpile enabled before this change.

Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

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

CR: PASS

@sgtcoolguy sgtcoolguy merged commit ac4167a into tidev:master Feb 16, 2018
@sgtcoolguy sgtcoolguy deleted the global-this branch February 16, 2018 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants