Skip to content

Commit 1d64526

Browse files
committed
fixed tests
1 parent 95819ab commit 1d64526

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
"description": "Node.js SDK for integrating with FormSG",
99
"main": "./dist/index.js",
1010
"types": "./dist/index.d.ts",
11-
"exports": {
12-
".": "./dist/index.js"
13-
},
1411
"scripts": {
1512
"test": "NODE_OPTIONS=\"--max-old-space-size=8192\" jest",
1613
"test-ci": "jest --coverage",

src/crypto-v3.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,10 @@ export default class CryptoV3 extends CryptoBase {
148148

149149
if (submissionSecretKey === null) return null
150150

151-
const decryptedContent = this.decryptFromSubmissionKey(
151+
return this.decryptFromSubmissionKey(
152152
encodeBase64(submissionSecretKey),
153153
rest
154154
)
155-
156-
if (!decryptedContent) {
157-
throw new Error('Failed to decrypt content')
158-
}
159-
160-
return decryptedContent
161155
}
162156

163157
/**

0 commit comments

Comments
 (0)