DEV Community

Discussion on: Deploy your ZEIT's hosted website right from WordPress using Deploy Hooks

Collapse
 
tomgreeen profile image
tomgreeEn

In case anyone else has this issue, I solved it by wrapping the JS code in :

window.onload = function() { ... above code }

This prevents the JS trying to find the element to apply the listener to before the page is fully rendered.

Collapse
 
tomasperalta profile image
Tom

Hey Tom! Sorry for the late answer!

I’m happy you solved this one :)
Next time, feel free to DM me on Twitter or send me an email.

Cheers!