Skip to content

Commit

Permalink
Merge pull request #32 from ultraio/fix/urlReplace
Browse files Browse the repository at this point in the history
fix `urlReplace` util to correctly handle external URLs
  • Loading branch information
ammanpashasc authored May 29, 2024
2 parents 18cf428 + c92aea1 commit 9ac67d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metadata-tool",
"version": "1.4.6",
"version": "1.4.7",
"description": "",
"main": "index.ts",
"scripts": {
Expand Down Expand Up @@ -48,4 +48,4 @@
"singleQuote": true,
"printWidth": 120
}
}
}
2 changes: 1 addition & 1 deletion src/utils/urlReplace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function replaceUrls<T>(data: Object, workingDirectory: string, con
if (data.hasOwnProperty('uris')) {
const typedData = <StaticResource>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;
}

Expand Down

0 comments on commit 9ac67d4

Please sign in to comment.