mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
various code quality fixes (#5792)
* various code quality fixes * reduce duplicated code * add safety check
This commit is contained in:
@@ -210,7 +210,7 @@ export class ContentNodeDialogService {
|
||||
actionName: action,
|
||||
currentFolderId: contentEntry.id,
|
||||
imageResolver: this.imageResolver.bind(this),
|
||||
isSelectionValid: this.isNodeFile.bind(this),
|
||||
isSelectionValid: (entry: Node) => entry.isFile,
|
||||
select: select,
|
||||
showFilesInResult
|
||||
};
|
||||
@@ -234,10 +234,6 @@ export class ContentNodeDialogService {
|
||||
return null;
|
||||
}
|
||||
|
||||
private isNodeFile(entry: Node): boolean {
|
||||
return entry.isFile;
|
||||
}
|
||||
|
||||
private hasAllowableOperationsOnNodeFolder(entry: Node): boolean {
|
||||
return this.isNodeFolder(entry) && this.contentService.hasAllowableOperations(entry, 'create');
|
||||
}
|
||||
|
Reference in New Issue
Block a user