Make sure network plugin doesn't crash on invalid URLs

Summary: In the attached task an IPv6 address ended up in the URL send from IG. Since that URL couldn't be parsed, it crashed the network plugin. This change makes sure the plugin doesn't crash on invalid urls.

Reviewed By: cekkaewnumchai

Differential Revision: D23344503

fbshipit-source-id: c7ac2068e407a764d59e632bef1be7c4239c8c8a
This commit is contained in:
Michel Weststrate
2020-09-02 05:11:14 -07:00
committed by Facebook GitHub Bot
parent 2f7a84115c
commit cd197aeaaf
3 changed files with 10 additions and 4 deletions

View File

@@ -7,10 +7,10 @@
* @format
*/
export type DefaultKeyboardAction = 'clear' | 'goToBottom' | 'createPaste';
export type TopLevelMenu = 'Edit' | 'View' | 'Window' | 'Help';
export type MenuEntry = BuiltInMenuEntry | CustomMenuEntry;
export type DefaultKeyboardAction = keyof typeof buildInMenuEntries;
export type NormalizedMenuEntry = {
label: string;