fix: COD-153 preserve matched case selection

This commit is contained in:
Saqeb Akhter
2026-07-09 11:09:00 -04:00
committed by Aamer Akhter
parent 03192d9980
commit e8f5ac94f3
2 changed files with 42 additions and 0 deletions
+10
View File
@@ -475,6 +475,16 @@ Object.assign(CodemanApp.prototype, {
if (item.type === 'new-session') {
const caseSelect = document.getElementById('quickStartCase');
if (caseSelect && item.caseName) {
if (
caseSelect.tagName === 'SELECT' &&
typeof caseSelect.appendChild === 'function' &&
!Array.from(caseSelect.options || []).some((option) => option.value === item.caseName)
) {
const option = document.createElement('option');
option.value = item.caseName;
option.textContent = item.caseName;
caseSelect.appendChild(option);
}
caseSelect.value = item.caseName;
}
await this.run();