Skip to content

Commit c5d8555

Browse files
authored
Merge pull request #3193 from firebase/fz/rm-fix
Address database:remove bug that adds namespace twice
2 parents 14b2214 + 0f6a466 commit c5d8555

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/database/listRemote.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class RTDBListRemote implements ListRemote {
2424
private apiClient: Client;
2525

2626
constructor(private instance: string, private host: string) {
27-
const url = new URL(`${utils.addSubdomain(this.host, this.instance)}`);
27+
const url = new URL(utils.getDatabaseUrl(this.host, this.instance, "/"));
2828
this.apiClient = new Client({ urlPrefix: url.origin, auth: true });
2929
}
3030

@@ -34,7 +34,7 @@ export class RTDBListRemote implements ListRemote {
3434
startAfter?: string,
3535
timeout?: number
3636
): Promise<string[]> {
37-
const url = new URL(`${utils.addSubdomain(this.host, this.instance)}${path}.json`);
37+
const url = new URL(utils.getDatabaseUrl(this.host, this.instance, path + ".json"));
3838

3939
const params: any = {
4040
shallow: true,

0 commit comments

Comments
 (0)