zsajjad / react-facebook-pixel

React JS wrapper for Facebook's Pixel
MIT License
233 stars 86 forks source link

Fix node build where window reference throws #68

Closed mimcz closed 3 years ago

mimcz commented 3 years ago

When I was building Gatsby project with node I run into missing window exception. This PR fixes it by adding type check and moves it into init functiton.