Skip to content

Commit 429cbeb

Browse files
committed
Fix base url default
1 parent 7cfe34f commit 429cbeb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

data-browser/src/helpers/AppSettings.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ export const AppSettingsContextProvider = (
3232

3333
const [agent, setAgent] = useCurrentAgent();
3434
const [baseURL, setBaseURL] = useServerURL();
35-
const [drive, innerSetDrive] = useLocalStorage('drive', baseURL);
35+
// By default, we want to use the current URL's origin with a trailing slash.
36+
const [drive, innerSetDrive] = useLocalStorage('drive', baseURL + '/');
3637

3738
const setDrive = useCallback(
3839
(newDrive: string) => {

data-browser/tests/e2e.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ test.describe('data-browser', async () => {
5555

5656
// Sometimes we run the test server on a different port, but we should
5757
// only change the drive if it is non-default.
58-
if (serverUrl !== 'http://localhost:9883') {
58+
if (serverUrl !== defaultDevServer) {
5959
await changeDrive(serverUrl, page);
6060
}
6161

0 commit comments

Comments
 (0)