gsklee/ngStorage — pull request #8 by dcendents (2013-08-08 15:09:51+00:00)
Title: Ie fix

I'm developing a web site with angular and wanted to start using the local storage and came across ngStorage. It works like a charm on Chrome and Firefox but it came out with a strange error on Internet Explorer (Invalid Argument).

Turns out IE9 does not like the method key(0) when the local storage is empty and throws an exception instead of returning null as per the specification.

Changing the for loop to look at the localStorage.length instead fixes the problem.