diy / intercom.js

UNMAINTAINED: A client-side cross-window message broadcast library built on top of the HTML5 localStorage API.
566 stars 91 forks source link

Fallback plan for browsers that disable localStorage? #15

Open carcinocron opened 9 years ago

carcinocron commented 9 years ago
Uncaught TypeError: Cannot call method 'getItem' of null
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36

Here is the null.getItem() call: https://github.com/diy/intercom.js/blob/master/lib/intercom.js#L38

Here is where I think we could change this: https://github.com/diy/intercom.js/blob/master/lib/localstorage.js#L2

Perhaps we should check if localstorage is falsy in addition to undefined?

PaitoAnderson commented 8 years ago

+1

estatematt commented 8 years ago

+1 was writing something for iPad, this stopped me dead in my tracks.