Skip to content

Commit f4bc849

Browse files
committed
use structured close, readonly input
1 parent 1b18213 commit f4bc849

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tools/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,9 @@ export function decodeDotPropertyNames(properties: Record<string, unknown>): Rec
279279
return decodedProperties;
280280
}
281281

282-
export function transformActorInputSchemaProperties(input: IActorInputSchema): ActorInputSchemaProperties {
282+
export function transformActorInputSchemaProperties(input: Readonly<IActorInputSchema>): ActorInputSchemaProperties {
283283
// Deep clone input to avoid mutating the original object
284-
const inputClone: IActorInputSchema = JSON.parse(JSON.stringify(input));
284+
const inputClone: IActorInputSchema = structuredClone(input);
285285
let transformedProperties = markInputPropertiesAsRequired(inputClone);
286286
transformedProperties = buildApifySpecificProperties(transformedProperties);
287287
transformedProperties = filterSchemaProperties(transformedProperties);

0 commit comments

Comments
 (0)