You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found an issue in the createCollection function that results in an unhandled promise rejection when using a capped collection ({ … capped: true, cappedMax: <n> … }) without TTL (expireAfterSeconds not set). There's a bug in the conditional at line 118, which causes the deletion of a non-existing index:
Hi,
I found an issue in the
createCollection
function that results in an unhandled promise rejection when using a capped collection ({ … capped: true, cappedMax: <n> … }
) without TTL (expireAfterSeconds
not set). There's a bug in the conditional at line 118, which causes the deletion of a non-existing index:https://github.com/winstonjs/winston-mongodb/blob/master/lib/winston-mongodb.js#L118
With MongoDB 3.0.14, the
indexInformation
response has noexpireAfterSeconds
property, i.e.undefined
, butself.expireAfterSeconds
isfalse
.I created a pull request (#88) that fixes the issue. Would be nice if you could merge it and create a patch release. Thanks.
The text was updated successfully, but these errors were encountered: