mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
various code quality fixes (#5792)
* various code quality fixes * reduce duplicated code * add safety check
This commit is contained in:
@@ -71,8 +71,8 @@ export class LicenseModel {
|
||||
this.remainingDays = obj.remainingDays || null;
|
||||
this.holder = obj.holder || null;
|
||||
this.mode = obj.mode || null;
|
||||
this.isClusterEnabled = obj.isClusterEnabled ? true : false;
|
||||
this.isCryptodocEnabled = obj.isCryptodocEnabled ? true : false;
|
||||
this.isClusterEnabled = !!obj.isClusterEnabled;
|
||||
this.isCryptodocEnabled = !!obj.isCryptodocEnabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,10 +85,10 @@ export class VersionStatusModel {
|
||||
|
||||
constructor(obj?: any) {
|
||||
if (obj) {
|
||||
this.isReadOnly = obj.isReadOnly ? true : false;
|
||||
this.isAuditEnabled = obj.isAuditEnabled ? true : false;
|
||||
this.isQuickShareEnabled = obj.isQuickShareEnabled ? true : false;
|
||||
this.isThumbnailGenerationEnabled = obj.isThumbnailGenerationEnabled ? true : false;
|
||||
this.isReadOnly = !!obj.isReadOnly;
|
||||
this.isAuditEnabled = !!obj.isAuditEnabled;
|
||||
this.isQuickShareEnabled = !!obj.isQuickShareEnabled;
|
||||
this.isThumbnailGenerationEnabled = !!obj.isThumbnailGenerationEnabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user