Skip to content

Commit d7660ae

Browse files
committed
Fix base url default
1 parent 80e6c66 commit d7660ae

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
function setDrive(newDrive: string) {
3839
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
@@ -43,7 +43,7 @@ test.describe('data-browser', async () => {
4343
await page.goto(frontEndUrl);
4444
// Sometimes we run the test server on a different port, but we should
4545
// only change the drive if it is non-default.
46-
if (serverUrl !== 'http://localhost:9883') {
46+
if (serverUrl !== defaultDevServer) {
4747
await changeDrive(serverUrl, page);
4848
}
4949
await expect(page.locator(currentDriveTitle)).toBeVisible();

0 commit comments

Comments
 (0)