mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-11-03 19:08:50 +03:00
some small cleanups
This commit is contained in:
parent
c4f2033368
commit
bf90b32b51
4 changed files with 13 additions and 4 deletions
|
|
@ -502,6 +502,7 @@ export class FolderModel extends AbstractModel {
|
|||
*/
|
||||
get fullNameHash() {
|
||||
return this.fullName.replace(/[^a-z0-9._-]+/giu, b64EncodeJSONSafe);
|
||||
// return this.fullName.replace(/\/+/g, b64EncodeJSONSafe);
|
||||
// return /^[a-z0-9._-]+$/iu.test(this.fullName) ? this.fullName : b64EncodeJSONSafe(this.fullName);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const
|
|||
try {
|
||||
const value = localStorage.getItem(CLIENT_SIDE_STORAGE_INDEX_NAME);
|
||||
return value ? JSON.parse(value) : null;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
|
@ -45,7 +45,7 @@ export function set(key, data) {
|
|||
try {
|
||||
localStorage.setItem(CLIENT_SIDE_STORAGE_INDEX_NAME, JSON.stringify(storageResult));
|
||||
return true;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -57,7 +57,7 @@ export function set(key, data) {
|
|||
export function get(key) {
|
||||
try {
|
||||
return (getStorage() || {})['p' + key];
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue