mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add missing localStorage.coffee... oops
This commit is contained in:
parent
7dd1ab84d5
commit
18d627baba
1 changed files with 12 additions and 0 deletions
12
services/web/public/coffee/modules/localStorage.coffee
Normal file
12
services/web/public/coffee/modules/localStorage.coffee
Normal 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
|
Loading…
Reference in a new issue