marvelapp / react-ab-test

A/B testing React components and debug tools. Isomorphic with a simple, universal interface. Well documented and lightweight. Tested in popular browsers and Node.js. Includes helpers for Mixpanel and Segment.com.
MIT License
240 stars 47 forks source link

fix localstorage availability check #4

Closed Otouto closed 5 years ago

Otouto commented 5 years ago

Table of Contents

Description

Here is the problem if one try to run code on site with disabled access to cookie/localstorage/sessionstorage:

screen shot 2018-10-26 at 10 24 19 am

Motivation and Context

We use react-ab-test on our site and want our code running even if localstorage disabled.

How Has This Been Tested?

Run code after fix in browser with disabled access to localstorage and everything works just fine.

Types of changes

Checklist:

moretti commented 5 years ago

Released in v2.1.2

Otouto commented 5 years ago

Agreed, if block here is unnecessary. Thank you for the fast merge and release 💪