Skip to content

Commit 7f13a73

Browse files
authored
More lenient parameter checks (v7) (#1663)
1 parent 14d0dfc commit 7f13a73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@ class Client extends ESAPI {
120120
maxCompressedResponseSize: null
121121
}, opts)
122122

123-
if (options.maxResponseSize !== null && options.maxResponseSize > buffer.constants.MAX_STRING_LENGTH) {
123+
if (options.maxResponseSize != null && options.maxResponseSize > buffer.constants.MAX_STRING_LENGTH) {
124124
throw new ConfigurationError(`The maxResponseSize cannot be bigger than ${buffer.constants.MAX_STRING_LENGTH}`)
125125
}
126126

127-
if (options.maxCompressedResponseSize !== null && options.maxCompressedResponseSize > buffer.constants.MAX_LENGTH) {
127+
if (options.maxCompressedResponseSize != null && options.maxCompressedResponseSize > buffer.constants.MAX_LENGTH) {
128128
throw new ConfigurationError(`The maxCompressedResponseSize cannot be bigger than ${buffer.constants.MAX_LENGTH}`)
129129
}
130130

131-
if (options.caFingerprint !== null && isHttpConnection(opts.node || opts.nodes)) {
131+
if (options.caFingerprint != null && isHttpConnection(opts.node || opts.nodes)) {
132132
throw new ConfigurationError('You can\'t configure the caFingerprint with a http connection')
133133
}
134134

0 commit comments

Comments
 (0)