[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:
parent
f1d9982635
commit
445e9f0441
|
@ -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[] {
|
||||
|
|
Loading…
Reference in New Issue