| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,13 +94,15 @@ function generateKeyPairSync(type, options) { | |||
| 94 | 94 | } | |
| 95 | 95 | ||
| 96 | 96 | function handleError(ret) { | |
| 97 | - if (ret === undefined) | ||
| 97 | + if (ret == null) | ||
| 98 | 98 | return; // async | |
| 99 | 99 | ||
| 100 | - const [err, [publicKey, privateKey]] = ret; | ||
| 100 | + const [err, keys] = ret; | ||
| 101 | 101 | if (err !== undefined) | |
| 102 | 102 | throw err; | |
| 103 | 103 | ||
| 104 | + const [publicKey, privateKey] = keys; | ||
| 105 | + | ||
| 104 | 106 | // If no encoding was chosen, return key objects instead. | |
| 105 | 107 | return { | |
| 106 | 108 | publicKey: wrapKey(publicKey, PublicKeyObject), | |
| Back | FazBrowse Home | New Git URL |
0 commit comments