Skip to content

Commit 8a2c2be

Browse files
committed
Fix base url default
1 parent c9b19a4 commit 8a2c2be

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
@@ -31,7 +31,8 @@ export const AppSettingsContextProvider = (
3131

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

3637
function setDrive(newDrive: string) {
3738
const url = new URL(newDrive);

data-browser/tests/e2e.spec.ts

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

5050
// Sometimes we run the test server on a different port, but we should
5151
// only change the drive if it is non-default.
52-
if (serverUrl !== 'http://localhost:9883') {
52+
if (serverUrl !== defaultDevServer) {
5353
await changeDrive(serverUrl, page);
5454
}
5555

0 commit comments

Comments
 (0)