cubiq/add-to-homescreen — pull request #114 by cgwyllie (2014-09-25 11:20:33+00:00)
Title: Fix issue where JSON.parse(undefined) throws exception

Hi,

I observed an error "unexpected token u" on an embedded Android WebView, searched around a little, and discovered `JSON.parse` with `undefined` can cause this issue on some browsers: http://stackoverflow.com/a/13022566

A really simple fix by not parsing the session data if it's not defined, then falling back to the default session as before.

Thanks for this great library!