Skip to content

Commit 43509b3

Browse files
author
Ives van Hoorne
committed
Encode the version when fetching npm versions
1 parent 40dd7a1 commit 43509b3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/app/src/sandbox/npm/fetch-dependencies.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ async function getAbsoluteDependencies(dependencies: Object) {
105105
nonAbsoluteDependencies.map(async dep => {
106106
try {
107107
const data = await window
108-
.fetch(`${host}/api/v1/dependencies/${dep}@${dependencies[dep]}`)
108+
.fetch(
109+
`${host}/api/v1/dependencies/${dep}@${encodeURIComponent(
110+
dependencies[dep]
111+
)}`
112+
)
109113
.then(x => x.json())
110114
.then(x => x.data);
111115

0 commit comments

Comments
 (0)