X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/215016dc53873f311b5eb3e7e86f2d967ec447fe..35d6c5a870aeff7bb2cbf6ec80d306debad872c1:/src/models/resource.ts diff --git a/src/models/resource.ts b/src/models/resource.ts index 2af51ecbc4..4708a9dac8 100644 --- a/src/models/resource.ts +++ b/src/models/resource.ts @@ -58,8 +58,8 @@ export enum ResourceObjectType { } export const RESOURCE_UUID_PATTERN = '[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{15}'; -export const RESOURCE_UUID_REGEX = new RegExp(RESOURCE_UUID_PATTERN); -export const COLLECTION_PDH_REGEX = /[a-f0-9]{32}\+\d+/; +export const RESOURCE_UUID_REGEX = new RegExp("^" + RESOURCE_UUID_PATTERN + "$"); +export const COLLECTION_PDH_REGEX = /^[a-f0-9]{32}\+\d+$/; export const isResourceUuid = (uuid: string) => RESOURCE_UUID_REGEX.test(uuid); @@ -104,7 +104,6 @@ export const extractUuidKind = (uuid: string = '') => { return ResourceKind.LINK; default: const match = COLLECTION_PDH_REGEX.exec(uuid); - console.log("matching " + match); return match ? ResourceKind.COLLECTION : undefined; } };