From 238a0c60d95a27293b0c7fb1bc9b06119834dec7 Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Fri, 12 Feb 2021 17:16:11 -0800 Subject: [PATCH] Fix error when listing MIAA databases (#14286) --- extensions/arc/src/common/utils.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/extensions/arc/src/common/utils.ts b/extensions/arc/src/common/utils.ts index 5c0abb7ac9..35985287c5 100644 --- a/extensions/arc/src/common/utils.ts +++ b/extensions/arc/src/common/utils.ts @@ -198,12 +198,16 @@ export function getErrorMessage(error: any, useMessageWithLink: boolean = false) /** * Parses an address into its separate ip and port values. Address must be in the form : + * or , * @param address The address to parse */ export function parseIpAndPort(address: string): { ip: string, port: string } { - const sections = address.split(':'); + let sections = address.split(':'); if (sections.length !== 2) { - throw new Error(`Invalid address format for ${address}. Address must be in the form :`); + sections = address.split(','); + if (sections.length !== 2) { + throw new Error(`Invalid address format for ${address}. Address must be in the form : or ,`); + } } return { ip: sections[0],