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

Fix initialization of admin menu item on frontend #58

Merged
merged 1 commit into from
Mar 13, 2020

Conversation

westonruter
Copy link
Contributor

When updating to the most recent version of pantheon-hud I noticed that the admin bar item didn't initialize on the frontend. The issue is that document.querySelector('#wp-admin-bar-pantheon-hud') returns no element at the point where the script is run. The fix is to defer it to DOMContentLoaded.

Fixes regression in #55.

@danielbachhuber
Copy link
Contributor

Thanks @westonruter !

@danielbachhuber danielbachhuber added this to the 0.3.1 milestone Mar 13, 2020
@danielbachhuber danielbachhuber merged commit 6b47250 into pantheon-systems:master Mar 13, 2020
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.

2 participants