Skip to content

Commit aa9489f

Browse files
committed
fix: use encodeURIComponent for path
1 parent 18ce811 commit aa9489f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/workspaceApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function useWorkspaceApi() {
1212
showHidden = false
1313
): Promise<FileType[]> {
1414
const url = new URL(
15-
`/api/v2/conversations/${conversationId}/workspace${path ? `/${path}` : ''}`,
15+
`/api/v2/conversations/${conversationId}/workspace${path ? `/${encodeURIComponent(path)}` : ''}`,
1616
api.baseUrl
1717
);
1818
url.searchParams.set('show_hidden', showHidden.toString());

0 commit comments

Comments
 (0)