mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Use JavaScript Optional chaining in vendors/*
This commit is contained in:
parent
e5e4675c1b
commit
ef8b1f40e4
28 changed files with 619 additions and 750 deletions
4
vendors/routes/hasher.js
vendored
4
vendors/routes/hasher.js
vendored
|
|
@ -15,11 +15,11 @@
|
|||
_hashValRegexp = /#(.*)$/,
|
||||
_hashRegexp = /^[#/]+/,
|
||||
_hashTrim = /^\/|\$/g,
|
||||
_trimHash = hash => hash ? hash.replace(_hashTrim, '') : '',
|
||||
_trimHash = hash => hash?.replace(_hashTrim, '') || '',
|
||||
_getWindowHash = () => {
|
||||
//parsed full URL instead of getting window.location.hash because Firefox decode hash value (and all the other browsers don't)
|
||||
var result = _hashValRegexp.exec( location.href );
|
||||
return (result && result[1]) ? decodeURIComponent(result[1]) : '';
|
||||
return result?.[1] ? decodeURIComponent(result[1]) : '';
|
||||
},
|
||||
_registerChange = newHash => {
|
||||
if (_hash !== newHash) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue