Open kieranm opened 3 months ago
In our code we had an issue where we passed max: undefined when creating a Postgres instance, expecting that it would fall back to the default 10.
max: undefined
However, the undefined value seems to overwrite the default max: 10 due to this line: https://github.com/porsager/postgres/blob/master/src/index.js#L472
undefined
max: 10
Then, due to this line, the array resolves to [undefined] and therefore only a single connection will be created. https://github.com/porsager/postgres/blob/master/src/index.js#L65
[undefined]
If max: undefined is passed then perhaps the default 10 needs to take precedence.
In our code we had an issue where we passed
max: undefined
when creating a Postgres instance, expecting that it would fall back to the default 10.However, the
undefined
value seems to overwrite the defaultmax: 10
due to this line: https://github.com/porsager/postgres/blob/master/src/index.js#L472Then, due to this line, the array resolves to
[undefined]
and therefore only a single connection will be created. https://github.com/porsager/postgres/blob/master/src/index.js#L65If
max: undefined
is passed then perhaps the default 10 needs to take precedence.