@kohost/api-client 4.0.12 → 4.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -944,15 +944,9 @@ var KohostHTTPClient = class _KohostHTTPClient {
944
944
  if (expectedError && newTokensNeeded) {
945
945
  while (!this.isAuthTokenRenewalActive) {
946
946
  this.isAuthTokenRenewalActive = true;
947
- return this.send(
948
- new RefreshTokenCommand({
949
- data: commandConfig.data,
950
- query: commandConfig.params,
951
- headers: commandConfig.headers
952
- })
953
- ).then(() => {
947
+ return this.send(new RefreshTokenCommand({})).then(() => {
954
948
  this.isAuthTokenRenewalActive = false;
955
- return fetch(request.clone());
949
+ return this.send(command);
956
950
  }).catch((err) => {
957
951
  this.isAuthTokenRenewalActive = false;
958
952
  return Promise.reject(err);