Turn off edit links when not editable

This commit is contained in:
RetiredWizard 2022-08-03 17:56:43 -04:00 committed by GitHub
parent f3db5709c3
commit 9e2f6dfc13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -261,9 +261,11 @@ async function refresh_list() {
delete_button.disabled = !editable;
delete_button.onclick = del;
edit_url = new URL(edit_url, url_base);
let edit_link = clone.querySelector(".edit_link");
edit_link.href = edit_url
if (editable) {
edit_url = new URL(edit_url, url_base);
let edit_link = clone.querySelector(".edit_link");
edit_link.href = edit_url
}
new_children.push(clone);
}