diff --git a/packages/rocketchat-importer/server/classes/ImporterBase.js b/packages/rocketchat-importer/server/classes/ImporterBase.js index 813d0f7354648..b2e412eaa083f 100644 --- a/packages/rocketchat-importer/server/classes/ImporterBase.js +++ b/packages/rocketchat-importer/server/classes/ImporterBase.js @@ -29,9 +29,9 @@ export class Base { * @static */ static getBSONSize(item) { - const { BSON } = require('bson'); - const bson = new BSON(); - return bson.calculateObjectSize(item); + const { calculateObjectSize } = require('bson'); + + return calculateObjectSize(item); } /**