mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 05:41:33 +02:00
Add missing localStorage.coffee... oops
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user