Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tokenResolvers.find can't work #121

Closed
chang-ke opened this issue Mar 15, 2018 · 3 comments
Closed

tokenResolvers.find can't work #121

chang-ke opened this issue Mar 15, 2018 · 3 comments

Comments

@chang-ke
Copy link

under some special circumstances, function jwt can work but tokenResolvers.find can't work, so token is undefind, it happend after I download a file form server, when I use

tokenResolvers.forEach(resolver => {
      if (resolver(ctx, opts)) {
        token = resolver(ctx, opts);
      }
});

instead of

tokenResolvers.find(resolver => token = resolver(ctx, opts));

it can works well after I download file

@SwenChan
Copy link

SwenChan commented Jun 1, 2018

@xuan45 you should check if your Array.find is replace by other package.

console.log('forEach',tokenResolvers.forEach)
console.log('find',tokenResolvers.find)

you should see that

forEach function forEach() { [native code] }  // native code should see this
find function find() { *&^&%&*%*&%*%*& }  // prototype has been modify should see this

That's the reason why your code do not work.

@navyxie
Copy link

navyxie commented Jun 1, 2018

@xuan45 Are you applied excel-export node module? It haved a bug
You can use exceljs

@chang-ke
Copy link
Author

chang-ke commented Jun 2, 2018

@navyxie yes, I use "excel-export": "^0.5.1", I never consider it would confict with es6, thank you very much

@chang-ke chang-ke closed this as completed Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants