Git Product home page Git Product logo

Comments (6)

ebisbe avatar ebisbe commented on May 27, 2024 1

Ops, I copy pasted and set the ticks ` in the wrong word. Previous was meant to be explanation sentence. I've updated the upper comment. In your case, as everything has been set up is check if neither window nor document exists.
I reviewed your test for isInBrowserContext() but I'm not sure how would you want to test it.

Will do a PR.

from vue-gtm.

Shinigami92 avatar Shinigami92 commented on May 27, 2024

Please open a PR with the change and potentially a working test that does fail when the fix is not applied.

from vue-gtm.

Shinigami92 avatar Shinigami92 commented on May 27, 2024

Are you sure that https://github.com/gtm-support/core/blob/687524ae88b6efa11644181f6709799dce713726/src/gtm-support.ts#L94 is not already sufficient enough?
Do you also have any example of an error that you get?

from vue-gtm.

ebisbe avatar ebisbe commented on May 27, 2024

@Shinigami92 here you can try it https://github.com/Skedr/landing/tree/gtm install with npm and then run npm run build

from vue-gtm.

ebisbe avatar ebisbe commented on May 27, 2024

Updating this line https://github.com/gtm-support/core/blob/33ed2424c61665129e2bf3d3daf0d708ef5b9050/src/gtm-support.ts#L69 should do the trick as you said.

Checking window and document

from vue-gtm.

Shinigami92 avatar Shinigami92 commented on May 27, 2024

Oh wait, now I'm bit confused 🤔
This line is there so that the plugin doesn't run when window is not defined.
But in you example from above (if (typeof window === 'undefined') return previous) what is previous?

Like I said, I will now await just a PR from you, and then it is easier to discuss in the PR. Cause I don't want to waste time with something to find out when you already know exactly what you want 🙂
I hope you can understand.

from vue-gtm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.