Skip to content

Commit

Permalink
Fix #358: rectify coding mistake in failedTokens snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
eladnava committed Oct 15, 2021
1 parent 345392c commit a4df9a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ sender.send(message, { registrationTokens: registrationTokens }, 10, function (e
// The results-array does not contain any tokens!
// A: The array of tokens used for sending will match the array of results, so you can cross-check them.
sender.send(message, { registrationTokens: registrationTokens }, function (err, response) {
var failed_tokens = registrationTokens.filter((token, i) => response[i].error != null);
var failed_tokens = registrationTokens.filter((token, i) => response.results[i].error != null);
console.log('These tokens are no longer ok:', failed_tokens);
});
```
Expand Down

0 comments on commit a4df9a3

Please sign in to comment.