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

Make global-bind plugin safe in node envs #465

Merged
merged 1 commit into from
Jan 23, 2020

Conversation

blowery
Copy link
Contributor

@blowery blowery commented Nov 20, 2019

When mousetrap loads in a non-dom environment, it bails early and doesn't set the Mousetrap global. Make the global-bind plugin detect that Mousetrap didn't initialize and bail itself.

When mousetrap loads in a non-dom environment, it bails early and doesn't set the Mousetrap global. Make the global-bind plugin detect that Mousetrap didn't initialize and bail itself.
@ockham
Copy link

ockham commented Jan 23, 2020

👋 @ccampbell Any chance we could get this merged? Would help us out in WordPress-land (WordPress/gutenberg#16227 (comment)) 🙂

@ccampbell ccampbell merged commit fc4b6d0 into ccampbell:master Jan 23, 2020
@ccampbell
Copy link
Owner

Sure thing. Merged and published a new release to NPM (1.6.4).

@blowery
Copy link
Contributor Author

blowery commented Jan 23, 2020

Ahhhhh... this didn't actually work. The usage of the global Mousetrap at the end throws a ReferenceError

@blowery blowery deleted the patch-1 branch January 23, 2020 21:39
blowery added a commit to blowery/mousetrap that referenced this pull request Jan 23, 2020
Follow on from ccampbell#465, which missed the ReferenceError from trying to use the Mousetrap global at the end of the file.
romanrizzi pushed a commit to discourse/mousetrap that referenced this pull request Mar 5, 2020
Make global-bind plugin safe in node envs
romanrizzi pushed a commit to discourse/mousetrap that referenced this pull request Mar 5, 2020
Follow on from ccampbell#465, which missed the ReferenceError from trying to use the Mousetrap global at the end of the file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants