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(gatsby-plugin-google-tagmanager): guard against dataLayer being undefined in development #14437

Conversation

zslabs
Copy link
Contributor

@zslabs zslabs commented May 30, 2019

Description

Fixes issue that attempted to fire window.dataLayer functions when tag manager was not loaded.

Related Issues

Fixes #14424

@zslabs zslabs requested a review from DSchau May 30, 2019 18:07
@DSchau DSchau changed the title gatsby-plugin-google-tagmanager - Resolve #14424 fix(gatsby-plugin-google-tagmanager): guard against dataLayer being undefined in development May 30, 2019
Copy link
Contributor

@DSchau DSchau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some unit tests to validate we keep this fixed 👌

Waiting for the CI checks to pass, then I'll merge and publish. Thanks!

@DSchau DSchau added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label May 30, 2019
@DSchau DSchau merged commit ecb5d7b into gatsbyjs:master May 30, 2019
@DSchau
Copy link
Contributor

DSchau commented May 30, 2019

Successfully published:
 - gatsby-plugin-google-tagmanager@2.0.15

@zslabs zslabs deleted the topics/gatsby-plugin-google-tagmanager--pusherror branch May 30, 2019 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot read property 'push' of undefined
2 participants