Skip to content

Commit 7583f8b

Browse files
Merge pull request #92 from Kukunin/fix-crash
Nullify batchRequestId immediatelly
2 parents 8e94116 + f832891 commit 7583f8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/dynamics-web-api.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,12 +1474,12 @@ function DynamicsWebApi(config) {
14741474
request.collection = '$batch';
14751475

14761476
_isBatch = false;
1477-
return _makeRequest('POST', request, 'executeBatch')
1477+
const promise = _makeRequest('POST', request, 'executeBatch')
14781478
.then(function (response) {
14791479
return response.data;
1480-
}).finally(function () {
1481-
_batchRequestId = null;
14821480
});
1481+
_batchRequestId = null;
1482+
return promise;
14831483
};
14841484

14851485
/**

0 commit comments

Comments
 (0)