olahol / react-ab

Simple declarative and universal A/B testing component for React.
431 stars 24 forks source link

exceptions on server side rendering #9

Open nsantini opened 8 years ago

nsantini commented 8 years ago

basically trying to use 'window' and 'document' will throw an exception on the server, so wrapping their use with a try/catch and returning default values will sort it (tested it manually and it works)