diff --git a/src/api/public.js b/src/api/public.js index e001ba749..78db90bfe 100644 --- a/src/api/public.js +++ b/src/api/public.js @@ -105,7 +105,7 @@ export const fetchUserByName = ({ name, credentials }) => }) .then(({ data }) => data.id) .catch((error) => { - if (error && error.statusCode === 404) { + if (error?.statusCode === 404) { // Either the backend does not support lookup endpoint, // or there is no user with such name. Fallback and treat name as id. return name diff --git a/src/api/user.js b/src/api/user.js index 89b37dba0..aa111e305 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -613,7 +613,7 @@ export const listAliases = ({ credentials }) => method: 'GET', credentials, params: { - _cacheBooster: new Date().getTime(), + _cacheBooster: Date().now(), }, }) @@ -799,7 +799,7 @@ export const listBackups = ({ credentials }) => method: 'GET', credentials, params: { - _cacheBooster: new Date().getTime(), + _cacheBooster: Date().now(), }, })