mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
e035d526d6
Restructure frontend directories GitOrigin-RevId: 5a1224ca186f4809df45680a80d374c1c318d7bf
13 lines
384 B
JavaScript
13 lines
384 B
JavaScript
angular.module('localStorage', []).value('localStorage', function(...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
|
|
}
|
|
})
|