fix: prevent viewer crash when opening DICOM Tag Browser from empty viewport (#5827)

This commit is contained in:
Ghadeer Albattarni authored and GitHub committed 2026-02-24 08:53:05 -05:00
1 parent a8f709982f
commit d11d6d401b
3 files changed
+62 -4

No files matched your search

+6 -3
View File
@@ -29,13 +29,16 @@ export class DicomTagBrowserPageObject {
await trigger.click();
},
async selectOption(index) {
async getOptionText(index) {
await this.click();
const optionText = await options.nth(index).innerText();
const selectedText = optionText.split('\n')[0].trim();
const trimmedOptionText = optionText.split('\n')[0].trim();
return trimmedOptionText;
},
async selectOption(index) {
const selectedText = await this.getOptionText(index);
await options.nth(index).click();
return selectedText;
},
};