GoogleChromeLabs / web-push-codelab

Other
557 stars 293 forks source link

Incorrect pushSubscription.getKeys method in sample code #81

Open j1mr10rd4n opened 5 years ago

j1mr10rd4n commented 5 years ago

The sample code in the Send a subscription to your server section contains the following snippet:

const subscriptionObject = {
  endpoint: pushSubscription.endpoint,
  keys: {
    p256dh: pushSubscription.getKeys('p256dh'),
    auth: pushSubscription.getKeys('auth')
  }
};

However, there is no getKeys method on PushSubscription. The correct method call is getKey(name)