Skip to content

Commit

Permalink
fix: ensure batch url resources start with / (#2740)
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinbarron authored Sep 27, 2023
1 parent a724b05 commit 247f37a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/mgt-element/src/utils/BatchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ export class BatchRequest {
public id: string;

constructor(index: number, id: string, resource: string, method: string) {
if (resource.startsWith('/')) {
resource = '/' + resource;
}
this.resource = resource;
this.resource = resource.startsWith('/') ? resource : `/${resource}`;
this.method = method;
this.index = index;
this.id = id;
Expand Down

0 comments on commit 247f37a

Please sign in to comment.