mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #2160 from overleaf/pr-persist-contact-modal-details
Persist contact modal form info GitOrigin-RevId: d7bf656015694e36a717e89de0879233c43d63a3
This commit is contained in:
parent
e5e28c7fb1
commit
89abb5b609
3 changed files with 20 additions and 15 deletions
|
@ -22,6 +22,7 @@ define([
|
|||
'modules/recursionHelper',
|
||||
'modules/errorCatcher',
|
||||
'modules/localStorage',
|
||||
'modules/sessionStorage',
|
||||
'utils/underscore'
|
||||
], function() {
|
||||
const App = angular
|
||||
|
@ -35,6 +36,7 @@ define([
|
|||
'ipCookie',
|
||||
'ErrorCatcher',
|
||||
'localStorage',
|
||||
'sessionStorage',
|
||||
'ngTagsInput',
|
||||
'ui.select'
|
||||
])
|
||||
|
|
|
@ -1,21 +1,11 @@
|
|||
/* eslint-disable
|
||||
no-undef,
|
||||
*/
|
||||
// TODO: This file was created by bulk-decaffeinate.
|
||||
// Fix any style issues and re-enable lint.
|
||||
/*
|
||||
* decaffeinate suggestions:
|
||||
* DS101: Remove unnecessary use of Array.from
|
||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
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(...Array.from(args || []))
|
||||
return $.localStorage(...args)
|
||||
} catch (e) {
|
||||
console.error('localStorage exception', e)
|
||||
return null
|
||||
|
|
13
services/web/public/src/modules/sessionStorage.js
Normal file
13
services/web/public/src/modules/sessionStorage.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
angular.module('sessionStorage', []).value('sessionStorage', function(...args) {
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
try {
|
||||
return $.sessionStorage(...args)
|
||||
} catch (e) {
|
||||
console.error('sessionStorage exception', e)
|
||||
return null
|
||||
}
|
||||
})
|
Loading…
Reference in a new issue