From c92aea173e4188d58fce197f6424be1955315dfd Mon Sep 17 00:00:00 2001 From: ammanpashasc Date: Tue, 28 May 2024 21:24:33 +0500 Subject: [PATCH] fix urlReplace util to correctly handle external URLs. Bump version --- package-lock.json | 4 ++-- package.json | 4 ++-- src/utils/urlReplace.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index ba95161..82e4150 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "metadata-tool", - "version": "1.4.6", + "version": "1.4.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "metadata-tool", - "version": "1.4.6", + "version": "1.4.7", "license": "ISC", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index 1e2e9e1..2cd8c2a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metadata-tool", - "version": "1.4.6", + "version": "1.4.7", "description": "", "main": "index.ts", "scripts": { @@ -48,4 +48,4 @@ "singleQuote": true, "printWidth": 120 } -} \ No newline at end of file +} diff --git a/src/utils/urlReplace.ts b/src/utils/urlReplace.ts index 2727ba9..2a72b83 100644 --- a/src/utils/urlReplace.ts +++ b/src/utils/urlReplace.ts @@ -17,7 +17,7 @@ export async function replaceUrls(data: Object, workingDirectory: string, con if (data.hasOwnProperty('uris')) { const typedData = data; for (let i = 0; i < typedData.uris.length; i++) { - if (typedData.uris.includes('http') || typedData.uris.includes('https')) { + if (typedData.uris[i].includes('http') || typedData.uris[i].includes('https')) { continue; }