Skip to content

Commit

Permalink
Merge pull request web-push-libs#263 from web-push-libs/gauntface-gcm…
Browse files Browse the repository at this point in the history
…-error-fix

GCM Error no longer undefined
  • Loading branch information
marco-c authored Feb 7, 2017
2 parents a21b971 + a41c0dc commit da0b527
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/web-push-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ WebPushLib.prototype.generateRequestDetails =
if (isGCM) {
if (!currentGCMAPIKey) {
console.warn('Attempt to send push notification to GCM endpoint, ' +
'but no GCM key is defined'.bold.red);
'but no GCM key is defined. Please use setGCMApiKey() or add ' +
'\'gcmAPIKey\' as an option.');
} else {
requestDetails.headers.Authorization = 'key=' + currentGCMAPIKey;
}
Expand Down

0 comments on commit da0b527

Please sign in to comment.