gsklee / ngStorage

localStorage and sessionStorage done right for AngularJS.
MIT License
2.33k stars 461 forks source link

Test sessionStorage prior to usage #196

Closed sime closed 7 years ago

sime commented 8 years ago

I'm re-sending this PR as I have rediscovered the bug again.

Attempting to use sessionStorage in private mode Safari (OS X or iOS) throws an ugly exception.

Plnkr to test. Code: http://plnkr.co/edit/BFLWePaqO9xEP599zZlP?p=preview Demo only: http://run.plnkr.co/G9RB1ANSfL0k3X6P/

Interestingly once the exception is thrown by sessionStorage, further attempts to use localStorage also throws an exception.

jrauschenbusch commented 8 years ago

+1 for this PR

sime commented 7 years ago

Closing as #213 solves the same problem.