Skip to content

Commit e018d7c

Browse files
committed
Merge pull request #169 from PaulKinlan/master
Fixes issue where getKeys would always return new VAPID keys
2 parents d244f9f + 0875020 commit e018d7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/web-push.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ const vapidPvtKey = argv['vapid-pvtkey'] || null;
2424

2525
function getKeys() {
2626
if (vapidPubKey && vapidPvtKey) {
27-
const publicKey = fs.readFileSync(argv['vapid-pubkey']);
28-
const privateKey = fs.readFileSync(argv['vapid-pvtkey']);
27+
const publicKey = fs.readFileSync(vapidPubKey);
28+
const privateKey = fs.readFileSync(vapidPvtKey);
2929

30-
if (pubKey && pvtKey) {
30+
if (publicKey && privateKey) {
3131
return {
3232
privateKey,
3333
publicKey

0 commit comments

Comments
 (0)