-
Notifications
You must be signed in to change notification settings - Fork 6
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: Expose Adapt variable only when Dev Tools drawer is open (fixes #78) #82
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
Co-authored-by: Oliver Foster <[email protected]>
Co-authored-by: Oliver Foster <[email protected]>
@swashbuck is it possible to have this variable when devtools is enabled, not just when the drawer is open? It'd be more useful to have the |
What about having it added when the dev tools is opened for the first time and not removing it thereafter? The trouble of having it enabled as a global variable whilst booting up Adapt would be best mitigated by adding the variable as late as possible and preferably not at all without intent. |
@chris-steele This would not solve our original issue when devtools is enabled until we disable it immediately before packaging it up for release. QA would be less likely to catch any errors caused by the Adapt variable being global. In an ideal world, QA would do one final check with devtools disabled before releasing, but that rarely happens.
@oliverfoster I think this would be fine compromise. |
@oliverfoster @chris-steele Let me know if you are fine with the changes in eef26dc. |
🎉 This PR is included in version 3.5.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Fixes #78
Fix
Adapt
variable.Testing
Adapt
into the consoleAdapt
into the consoleExpected results
Adapt
will only be defined when the Dev Tools drawer is open. Otherwise, you will see something likeUncaught ReferenceError: Adapt is not defined
.