-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
dataLayer race condition #62
Comments
You should be able use the standard It seems like the real potential risk for a race condition is here since you aren't checking for the presence of the object you're firing an event to on the actual firing of the event. I think this might also cause a problem if you safe-initialized |
Hi, The problem was this line:
Testing now and will push to master later today. Thanks. |
btw, much of this needs to be rewritten. right now i just wanted to get a quick fix out. when i rewrite it i agree it'd be smart to make this more robust and check for the method presence before firing the event. |
Cool - thanks again for maintaining this library. |
JS error if
dataLayer.push()
is called before GA convertsdataLayer
from an array to a function.The text was updated successfully, but these errors were encountered: