Skip to content

Commit

Permalink
Remove comment with refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanblinov2k17 committed Nov 9, 2023
1 parent f26e30e commit f27fb52
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
12 changes: 7 additions & 5 deletions JSDemos/Demos/FileManager/AzureClientBinding/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ function App() {
promise = Promise.resolve();
}

promise = promise.then(() => gateway.putBlock( //
uploadInfo.customData.accessUrl,
uploadInfo.chunkIndex,
uploadInfo.chunkBlob,
));
promise = promise.then(() => {
const accessUrl = uploadInfo.customData.accessUrl;
return gateway.putBlock(
accessUrl,
uploadInfo.chunkIndex,
uploadInfo.chunkBlob,
)});

if (uploadInfo.chunkIndex === uploadInfo.chunkCount - 1) {
promise = promise.then(() => gateway.putBlockList(
Expand Down
11 changes: 4 additions & 7 deletions JSDemos/Demos/FileManager/AzureClientBinding/ReactJs/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,10 @@ function App() {
} else {
promise = Promise.resolve();
}
promise = promise.then(() =>
gateway.putBlock(
//
uploadInfo.customData.accessUrl,
uploadInfo.chunkIndex,
uploadInfo.chunkBlob,
));
promise = promise.then(() => {
const accessUrl = uploadInfo.customData.accessUrl;
return gateway.putBlock(accessUrl, uploadInfo.chunkIndex, uploadInfo.chunkBlob);
});
if (uploadInfo.chunkIndex === uploadInfo.chunkCount - 1) {
promise = promise.then(() =>
gateway.putBlockList(uploadInfo.customData.accessUrl, uploadInfo.chunkCount));
Expand Down

0 comments on commit f27fb52

Please sign in to comment.