Review comments - throw an error if callback url is not valid

This commit is contained in:
Roman committed 2021-08-14 21:59:54 +01:00
1 parent 2b6b4dd916
commit ee46978389
1 file changed
+1 -1
+1 -1
View File
@@ -22,7 +22,7 @@ export interface CallbackUrlInfo {
}
export function parseUrl(s: string): CallbackUrlInfo {
if (!s.startsWith('joplin://')) return null;
if (!isCallbackUrl(s)) throw new Error(`Invalid callback url ${s}`);
const url = new URL(s);
const params: Record<string, string> = {};