I'm using Google's "platform" sign-in for websites. On the signin page, I only display the sign-in button when the user is unauthenticated. Once they sign in, the button is removed from the page.
This causes Google to throw an error:
Uncaught TypeError: Cannot read property 'style' of null
This comes from this line of their minified code:
window.document.getElementById((c ? "not_signed_in" : "connected") + a.El).style.display = "none";
Which is clearly assuming that the button is still on the page.
Ideally, I'd like to fix this silly code and make it deal with this more gracefully. Is it open source? Can I contribute? Where can I find it?
If it's proprietary, I guess I'd be ok with a workaround. My thoughts for a workaround: if I could tell this Google thing to unrender the button, I think I'd be ok.
That is, I'm using the render
method as described in their docs. When I remove the button container from the page, I would like to unrender. I don't see any way to do that.
Any ideas?