mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-25 20:40:36 +03:00
B: Deep copy instead of modifying cache
This commit is contained in:
parent
32b8a480d6
commit
95f1284c6e
|
@ -22,7 +22,7 @@ export class OssLoader {
|
|||
private items: ILibraryItem[];
|
||||
|
||||
constructor(input: IOperationSchemaDTO, items: ILibraryItem[]) {
|
||||
this.oss = input as unknown as IOperationSchema;
|
||||
this.oss = structuredClone(input) as IOperationSchema;
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ export class RSFormLoader {
|
|||
private cstByID = new Map<number, IConstituenta>();
|
||||
|
||||
constructor(input: IRSFormDTO) {
|
||||
this.schema = input as unknown as IRSForm;
|
||||
this.schema = structuredClone(input) as IRSForm;
|
||||
this.schema.version = input.version ?? 'latest';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user