mirror of
https://github.com/documize/community.git
synced 2025-07-24 07:39:43 +02:00
Replaced underscore.js & is.js with lodash.js
This commit is contained in:
parent
df8e843bf5
commit
566807bc14
93 changed files with 17379 additions and 2056 deletions
|
@ -41,7 +41,7 @@ export default AjaxService.extend({
|
|||
let appVersion = headers['x-documize-version'];
|
||||
|
||||
// Unauthorized local API AJAX calls redirect to app root.
|
||||
if (status === 401 && is.not.undefined(appVersion) && is.not.include(window.location.href, '/auth')) {
|
||||
if (status === 401 && !_.isUndefined(appVersion) && !_.includes(window.location.href, '/auth')) {
|
||||
this.get('localStorage').clearAll();
|
||||
window.location.href = 'auth/login';
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ export default AjaxService.extend({
|
|||
this.set('appMeta.valid', false);
|
||||
}
|
||||
|
||||
if (this.get('session.authenticated') && is.not.empty(userUpdate) && is.not.undefined(userUpdate)) {
|
||||
if (this.get('session.authenticated') && !_.isEmpty(userUpdate) && !_.isUndefined(userUpdate)) {
|
||||
let latest = JSON.parse(userUpdate);
|
||||
// Permission change means re-validation.
|
||||
if (!latest.active || user.editor !== latest.editor || user.admin !== latest.admin ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue