Add missing localStorage.coffee... oops

This commit is contained in:
James Allen 2015-02-12 11:55:52 +00:00
parent 7dd1ab84d5
commit 18d627baba

View file

@ -0,0 +1,12 @@
angular.module("localStorage", [])
.value "localStorage", (args...) ->
###
localStorage can throw browser exceptions, for example if it is full
We don't use localStorage for anything critical, on in that case just
fail gracefully.
###
try
return $.localStorage args...
catch e
console.error "localStorage exception", e
return null