mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
fix: remove redundant config clone casts
This commit is contained in:
@@ -207,7 +207,7 @@ export async function mutateConfigWithPendingPluginInstalls<T = void>(
|
||||
return await transformConfigWithPendingPluginInstalls<T>({
|
||||
...params,
|
||||
transform: async (currentConfig, context): Promise<ConfigTransformResult<T>> => {
|
||||
const draft = structuredClone(currentConfig) as OpenClawConfig;
|
||||
const draft = structuredClone(currentConfig);
|
||||
const result = (await params.mutate(draft, context)) as T | undefined;
|
||||
return { nextConfig: draft, result };
|
||||
},
|
||||
|
||||
@@ -491,7 +491,7 @@ export async function mutateConfigFile<T = void>(params: {
|
||||
writeOptions: params.writeOptions,
|
||||
io: params.io,
|
||||
transform: async (currentConfig, context) => {
|
||||
const draft = structuredClone(currentConfig) as OpenClawConfig;
|
||||
const draft = structuredClone(currentConfig);
|
||||
const result = (await params.mutate(draft, context)) as T | undefined;
|
||||
return { nextConfig: draft, result };
|
||||
},
|
||||
@@ -515,7 +515,7 @@ export async function mutateConfigFileWithRetry<T = void>(params: {
|
||||
writeOptions: params.writeOptions,
|
||||
io: params.io,
|
||||
transform: async (currentConfig, context) => {
|
||||
const draft = structuredClone(currentConfig) as OpenClawConfig;
|
||||
const draft = structuredClone(currentConfig);
|
||||
const result = (await params.mutate(draft, context)) as T | undefined;
|
||||
return { nextConfig: draft, result };
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user