Fix tables

This commit is contained in:
Steve Faulkner
2021-01-04 10:09:24 -06:00
parent 1238d30f95
commit a844042580

View File

@@ -46,6 +46,6 @@ export function getDatabaseAccountKindFromExperience(apiExperience: string): str
export function extractMasterKeyfromConnectionString(connectionString: string): string { export function extractMasterKeyfromConnectionString(connectionString: string): string {
// Only Gremlin uses the actual master key for connection to cosmos // Only Gremlin uses the actual master key for connection to cosmos
const matchedParts: string[] = connectionString.match("AccountKey=(.*);ApiKind=Gremlin;$"); const matchedParts = connectionString.match("AccountKey=(.*);ApiKind=Gremlin;$");
return (matchedParts.length > 1 && matchedParts[1]) || undefined; return (matchedParts && matchedParts.length > 1 && matchedParts[1]) || undefined;
} }