Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Fixing bad check for ...
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Gaunt committed Feb 21, 2017
1 parent 019f294 commit 23d07d3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions companion-site/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ app.post('/api/send-push-msg', (req, res) => {
TTL: 60 * 60
};

console.log(req.body);

webpush.sendNotification(
req.body.subscription,
req.body.data,
Expand Down
2 changes: 1 addition & 1 deletion companion-site/static/scripts/send-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function sendPushMessage() {
return Promise.reject(new Error('The subscription MUST have an endpoint'));
}

if (subscriptionObject.endpoint.indexOf('...')) {
if (subscriptionObject.endpoint.indexOf('…') !== -1) {
return Promise.reject(new Error('The subscription endpoint appears to be ' +
'truncated (It has \'...\' in it).\n\nDid you copy it from the console ' +
'in Chrome?')
Expand Down

0 comments on commit 23d07d3

Please sign in to comment.