mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
c634f51eee
Add paywall prompt events GitOrigin-RevId: 6b1b3b384590f14828f37210b2e14047e2ee33d6
17 lines
448 B
JavaScript
17 lines
448 B
JavaScript
angular.module('sessionStorage', []).value('sessionStorage', sessionStorage)
|
|
|
|
/*
|
|
sessionStorage can throw browser exceptions, for example if it is full
|
|
We don't use sessionStorage for anything critical, on in that case just
|
|
fail gracefully.
|
|
*/
|
|
function sessionStorage(...args) {
|
|
try {
|
|
return $.sessionStorage(...args)
|
|
} catch (e) {
|
|
console.error('sessionStorage exception', e)
|
|
return null
|
|
}
|
|
}
|
|
|
|
export default sessionStorage
|