[Library]: Change copy method

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@57643 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-11-20 10:31:14 +00:00
parent f1d9982635
commit 445e9f0441
1 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,9 @@ export class HelperFunctions {
}
public static copy(element: any): any {
return JSON.parse(JSON.stringify(element));
// return JSON.parse(JSON.stringify(element));
// return { ...element};
return Object.assign(Object.create(element), element);
}
public static encodeArray(elements: string[]): string[] {