Skip to content

Commit a4df9a3

Browse files
committed
Fix #358: rectify coding mistake in failedTokens snippets
1 parent 345392c commit a4df9a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ sender.send(message, { registrationTokens: registrationTokens }, 10, function (e
130130
// The results-array does not contain any tokens!
131131
// A: The array of tokens used for sending will match the array of results, so you can cross-check them.
132132
sender.send(message, { registrationTokens: registrationTokens }, function (err, response) {
133-
var failed_tokens = registrationTokens.filter((token, i) => response[i].error != null);
133+
var failed_tokens = registrationTokens.filter((token, i) => response.results[i].error != null);
134134
console.log('These tokens are no longer ok:', failed_tokens);
135135
});
136136
```

0 commit comments

Comments
 (0)