mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5358] - fixed duplicated type on reopening viewer (#6815)
This commit is contained in:
@@ -66,8 +66,9 @@ export class ContentTypePropertiesService {
|
||||
}
|
||||
|
||||
private appendCurrentType(currentType: TypeEntry, contentTypesEntries: TypeEntry[]): TypeEntry[] {
|
||||
const resultTypes = contentTypesEntries;
|
||||
if (contentTypesEntries.indexOf(currentType) === -1) {
|
||||
const resultTypes = [...contentTypesEntries];
|
||||
const currentTypePresent = contentTypesEntries.find((type) => type.entry.id === currentType.entry.id);
|
||||
if (!currentTypePresent) {
|
||||
resultTypes.push(currentType);
|
||||
}
|
||||
return resultTypes;
|
||||
|
Reference in New Issue
Block a user