fix: minor errors during compilation

This commit is contained in:
Xiaohan-Tian
2026-06-05 18:09:31 -07:00
parent 748cd78e05
commit 2e27becaca
2 changed files with 10 additions and 7 deletions
+3 -2
View File
@@ -137,10 +137,11 @@ export class UpdateTrackTool extends BaseTool {
let instrumentKey: InstrumentType | undefined;
if (instrumentName !== undefined) {
instrumentKey = resolveInstrumentKeyByEnglishName(instrumentName);
if (!instrumentKey) {
const resolvedInstrumentKey = resolveInstrumentKeyByEnglishName(instrumentName);
if (resolvedInstrumentKey === null) {
return this.createErrorResult(`Invalid instrument "${instrumentName}". Use the exact English name from list_all_available_instruments.`);
}
instrumentKey = resolvedInstrumentKey;
}
const trackNameChanged = newTrackName !== undefined && newTrackName !== resolvedTrack.getName();