try catch on source selection

This commit is contained in:
Alan Trebugeais
2026-05-07 11:07:13 +02:00
parent 0193166bd5
commit bbe01b91e6
@@ -77,9 +77,13 @@ export function SourcePopover({
windowSources={windowSources}
selectedSource={selectedSource}
loading={loading}
onSourceSelect={(source) => {
void onSourceSelect(source);
requestClose(POPOVER_ID);
onSourceSelect={async (source) => {
try {
await onSourceSelect(source);
requestClose(POPOVER_ID);
} catch (error) {
console.error("Failed to select source:", error);
}
}}
onFetchSources={fetchSources}
open={open}