mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-27 06:22:12 +00:00
0e9771ac09
File outline extras GitOrigin-RevId: c35c4f35dce280c9f44c02b567df9734943d0cb0
17 lines
430 B
JavaScript
17 lines
430 B
JavaScript
angular.module('localStorage', []).value('localStorage', localStorage)
|
|
|
|
/*
|
|
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.
|
|
*/
|
|
function localStorage(...args) {
|
|
try {
|
|
return $.localStorage(...args)
|
|
} catch (e) {
|
|
console.error('localStorage exception', e)
|
|
return null
|
|
}
|
|
}
|
|
|
|
export default localStorage
|