mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix: avoid support write shadowed variable
This commit is contained in:
@@ -196,14 +196,14 @@ async function prepareWorkspaceSkillWrite(params: {
|
||||
symlinkPolicy: params.symlinkPolicy,
|
||||
});
|
||||
if (params.mode === "update") {
|
||||
const previousContent = await readWorkspaceSupportFile({
|
||||
const previousSupportContent = await readWorkspaceSupportFile({
|
||||
skillDir: params.skillDir,
|
||||
relativePath: file.path,
|
||||
});
|
||||
previousSupportFiles.push(
|
||||
previousContent === null
|
||||
previousSupportContent === null
|
||||
? { path: file.path, existed: false }
|
||||
: { path: file.path, existed: true, previousContent },
|
||||
: { path: file.path, existed: true, previousContent: previousSupportContent },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user