Skip to content

Commit ba4eebb

Browse files
0xHexEwilhuff
authored andcommitted
Use string concatenation instead of array join for making RPC URLs (#2301)
1 parent 3323467 commit ba4eebb

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

packages/firestore/src/platform_browser/webchannel_connection.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -415,16 +415,16 @@ export class WebChannelConnection implements Connection {
415415
makeUrl(rpcName: string): string {
416416
const urlRpcName = RPC_NAME_REST_MAPPING[rpcName];
417417
assert(urlRpcName !== undefined, 'Unknown REST mapping for: ' + rpcName);
418-
const url = [this.baseUrl, '/', RPC_URL_VERSION];
419-
url.push('/projects/');
420-
url.push(this.databaseId.projectId);
421-
422-
url.push('/databases/');
423-
url.push(this.databaseId.database);
424-
url.push('/documents');
425-
426-
url.push(':');
427-
url.push(urlRpcName);
428-
return url.join('');
418+
return (
419+
this.baseUrl +
420+
'/' +
421+
RPC_URL_VERSION +
422+
'/projects/' +
423+
this.databaseId.projectId +
424+
'/databases/' +
425+
this.databaseId.database +
426+
'/documents:' +
427+
urlRpcName
428+
);
429429
}
430430
}

0 commit comments

Comments
 (0)