Skip to content

Commit

Permalink
Avoid default arguments in destructuring (#8)
Browse files Browse the repository at this point in the history
* default assignment to be done outside destructuring

* 0.3.2
  • Loading branch information
liangyuanruo authored Mar 30, 2020
1 parent 662bd33 commit 690f909
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ const crypto = require('./src/crypto')
*/
module.exports = function (options) {
const {
mode = 'production',
mode,
webhookSecretKey,
} = options || {}

return {
webhooks: webhooks({
mode,
mode: mode || 'production',
webhookSecretKey
}),
crypto,
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opengovsg/formsg-sdk",
"version": "0.3.1",
"version": "0.3.2",
"description": "Node.js SDK for integrating with FormSG",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 690f909

Please sign in to comment.