mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-05 06:59:42 +02:00
fix: COD-153 preserve matched case selection
This commit is contained in:
committed by
Aamer Akhter
parent
03192d9980
commit
e8f5ac94f3
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user