Skip to content

Commit cb2e1e0

Browse files
authored
Merge pull request #6680 from FoamyGuy/edit_url_fix
fix edit URL for files inside of directories
2 parents 664cadc + da8451b commit cb2e1e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

supervisor/shared/web_workflow/static/directory.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ async function refresh_list() {
6363
var icon = "⬇";
6464
var file_path = current_path + f.name;
6565
let api_url = new URL("/fs" + file_path, url_base);
66+
let edit_url = "/edit/#" + file_path;
6667
if (f.directory) {
6768
file_path = "#" + file_path + "/";
6869
api_url += "/";
@@ -91,7 +92,7 @@ async function refresh_list() {
9192
delete_button.disabled = !editable;
9293
delete_button.onclick = del;
9394

94-
let edit_url = new URL("/edit/#" + f.name, url_base);
95+
edit_url = new URL(edit_url, url_base);
9596
let edit_link = clone.querySelector(".edit_link");
9697
edit_link.href = edit_url
9798

0 commit comments

Comments
 (0)