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

readme error in failedTokens snippets #358

Closed
yuripaoloni opened this issue Oct 14, 2021 · 1 comment
Closed

readme error in failedTokens snippets #358

yuripaoloni opened this issue Oct 14, 2021 · 1 comment

Comments

@yuripaoloni
Copy link

This part of the readme is wrong and should be fixed.

sender.send(message, { registrationTokens: registrationTokens }, function (err, response) {
  var failed_tokens = registrationTokens.filter((token, i) => response[i].error != null);
  console.log('These tokens are no longer ok:', failed_tokens);
});

response[i] is not accessible, it should be response.results[i].

Anyway, thanks a lot for the amazing work with node-gcm.

@eladnava
Copy link
Collaborator

Hi @yuripaoloni,
Nice find, thanks for catching that, and for your kind words. Fixed in a4df9a3. 👍

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

2 participants