Skip to content

Commit 3c046b8

Browse files
committed
fix: Use deepCopy for schema picking
1 parent 6b5aeae commit 3c046b8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/features/schema/helper/schemaHelpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from "fs";
22
import path from "path";
3-
import { copy, fetchHandler } from "../../../helper.js";
3+
import { deepClone, fetchHandler } from "../../../helper.js";
44
import type { ConfigInterface } from "../../config/index.js";
55
import type { SchemaInterface } from "../index.js";
66

@@ -13,7 +13,7 @@ export function pickSchema(schema: SchemaInterface): SchemaInterface {
1313
throw new Error("Schema is missing 'className' key.");
1414
}
1515

16-
schema = copy(schema);
16+
schema = deepClone(schema);
1717

1818
if (schema.fields) {
1919
delete schema.fields.objectId;

0 commit comments

Comments
 (0)