Skip to content

Commit 9403372

Browse files
committed
fix
1 parent ce6afd3 commit 9403372

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web_src/js/features/repo-view-file-tree-sidebar.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import {pathEscapeSegments, pathUnescapeSegments} from '../utils/url.ts';
44
import {GET, PUT} from '../modules/fetch.ts';
55
import ViewFileTree from '../components/ViewFileTree.vue';
66

7+
const {appSubUrl} = window.config;
8+
79
async function toggleSidebar(sidebarEl: HTMLElement, shouldShow: boolean) {
810
const showBtnEl = sidebarEl.parentElement.querySelector('.show-tree-sidebar-button');
911
const containerClassList = sidebarEl.parentElement.classList;
@@ -17,7 +19,7 @@ async function toggleSidebar(sidebarEl: HTMLElement, shouldShow: boolean) {
1719
if (!sidebarEl.hasAttribute('data-is-signed')) return;
1820

1921
// save to session
20-
await PUT('/repo/preferences', {
22+
await PUT(`${appSubUrl}/repo/preferences`, {
2123
data: {
2224
show_file_view_tree_sidebar: shouldShow,
2325
},

0 commit comments

Comments
 (0)