File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
sdk/tables/data-tables/src Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -154,10 +154,10 @@ export class InternalTableTransaction {
154154 const urlParts = url . split ( "?" ) ;
155155 this . url = urlParts [ 0 ] ;
156156 const sas = urlParts . length > 1 ? `?${ urlParts [ 1 ] } ` : "" ;
157- this . url = `${ this . url } / $batch${ sas } ` ;
157+ this . url = `${ this . getUrlWithSlash ( ) } $batch${ sas } ` ;
158158 } else {
159159 // When using a SharedKey credential no SAS token is needed
160- this . url = `${ this . url } / $batch` ;
160+ this . url = `${ this . getUrlWithSlash ( ) } $batch` ;
161161 }
162162 }
163163
@@ -307,6 +307,10 @@ export class InternalTableTransaction {
307307 throw new Error ( "All operations in a transaction must target the same partitionKey" ) ;
308308 }
309309 }
310+
311+ private getUrlWithSlash ( ) : string {
312+ return this . url . endsWith ( "/" ) ? this . url : `${ this . url } /` ;
313+ }
310314}
311315
312316function parseTransactionResponse ( transactionResponse : PipelineResponse ) : TableTransactionResponse {
You can’t perform that action at this time.
0 commit comments