diff --git a/CHANGELOG.md b/CHANGELOG.md index 08721f8..752d680 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixed - Return passed `record` instead of resulting record from mongodb calls to enable using newer mongodb driver. +- Use `result.modifiedCount` to enable newer mongodb driver. ## 10.1.0 - 2025-01-23 diff --git a/lib/storage/ConfigStorage.js b/lib/storage/ConfigStorage.js index d9ddc27..b385946 100644 --- a/lib/storage/ConfigStorage.js +++ b/lib/storage/ConfigStorage.js @@ -158,7 +158,7 @@ export class ConfigStorage { const result = await collection.updateOne( query, {$set: {config, 'meta.updated': now}}); - if(result.result.n === 0) { + if(result.modifiedCount === 0) { // no records changed... throw new BedrockError( 'Could not update configuration. ' +