redux-refresh-token icon indicating copy to clipboard operation
redux-refresh-token copied to clipboard

Error when using redux-api-middleware v3

Open htorohn opened this issue 5 years ago • 0 comments

Hello,

I'm trying to implement this library, but since v3 of redux-api-middleware remove the CALL_API alias, I'm getting the following error:

Unhandled promise rejection TypeError: Cannot read property 'endpoint' of undefined at defaultIsRefreshCall

checking the code, I found the line that is giving the error:

const defaultIsRefreshCall = (action, refreshAction) => {
  return action["Call API"].endpoint === refreshAction["Call API"].endpoint;
};

I'm guessing because explicitly is expecting for CALL_API on the action, but since now the alias is RSAA nothing is found.

is there any plan to upgrade this library to work with redux-api-middleware v3 an RSAA alias? or is there a work around I can try?

thanks in advance for your help.

htorohn avatar Jun 07 '19 17:06 htorohn