17337: Added another edge case handling
[arvados-workbench2.git] / src / services / collection-service / collection-service-files-response.ts
index 9a05fb61efc95e7be00ce5186d5ef020cf69a56f..9583b7a4ebd749ffaa2898ad176830c4214f8573 100644 (file)
@@ -28,7 +28,8 @@ export const extractFilesData = (document: Document) => {
         .map(element => {
             const name = getTagValue(element, 'D:displayname', '');
             const size = parseInt(getTagValue(element, 'D:getcontentlength', '0'), 10);
-            const url = customDecodeURI(getTagValue(element, 'D:href', ''));
+            const href = getTagValue(element, 'D:href', '');
+            const url = customDecodeURI(href);
             const nameSuffix = name;
             const collectionUuidMatch = collectionUrlPrefix.exec(url);
             const collectionUuid = collectionUuidMatch ? collectionUuidMatch.pop() : '';