Add receiver selector fallback for invalid frame contexts

This commit is contained in:
hensm
2020-01-24 01:27:52 +00:00
parent 27174c63ff
commit 5a4fff52e0

View File

@@ -89,10 +89,9 @@ async function getSelection (
}); });
availableMediaTypes = getMediaTypesForPageUrl(url); availableMediaTypes = getMediaTypesForPageUrl(url);
} catch (err) { } catch {
logger.error("Failed to locate frame"); logger.error("Failed to locate frame, falling back to default available media types.");
reject(); availableMediaTypes = ReceiverSelectorMediaType.File;
return;
} }
// Enable app media type if initialized sender app is found // Enable app media type if initialized sender app is found