Skip to content

Commit 96b5b8e

Browse files
authored
More lenient parameter checks (#1662)
1 parent eac00e1 commit 96b5b8e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,15 @@ export default class Client extends API {
186186
maxCompressedResponseSize: null
187187
}, opts)
188188

189-
if (options.caFingerprint !== null && isHttpConnection(opts.node ?? opts.nodes)) {
189+
if (options.caFingerprint != null && isHttpConnection(opts.node ?? opts.nodes)) {
190190
throw new errors.ConfigurationError('You can\'t configure the caFingerprint with a http connection')
191191
}
192192

193-
if (options.maxResponseSize !== null && options.maxResponseSize > buffer.constants.MAX_STRING_LENGTH) {
193+
if (options.maxResponseSize != null && options.maxResponseSize > buffer.constants.MAX_STRING_LENGTH) {
194194
throw new errors.ConfigurationError(`The maxResponseSize cannot be bigger than ${buffer.constants.MAX_STRING_LENGTH}`)
195195
}
196196

197-
if (options.maxCompressedResponseSize !== null && options.maxCompressedResponseSize > buffer.constants.MAX_LENGTH) {
197+
if (options.maxCompressedResponseSize != null && options.maxCompressedResponseSize > buffer.constants.MAX_LENGTH) {
198198
throw new errors.ConfigurationError(`The maxCompressedResponseSize cannot be bigger than ${buffer.constants.MAX_LENGTH}`)
199199
}
200200

0 commit comments

Comments
 (0)