fix: Safely handle missing active viewport (#5448)

This commit is contained in:
Sofien-Sellami authored and GitHub committed 2025-10-06 08:56:31 -04:00
1 parent 60633a8f3f
commit 792db26ff1
1 file changed
+5
@@ -291,6 +291,11 @@ class StudyPrefetcherService extends PubSubService {
}
const activeViewport = viewports.get(activeViewportId);
if (!activeViewport) {
return;
}
const displaySetUpdated = this._setActiveDisplaySetsUIDs(activeViewport.displaySetInstanceUIDs);
if (forceRestart || displaySetUpdated) {