Skip to content

Commit

Permalink
fix(types): handle Decimal128 when using bson-ext on server side
Browse files Browse the repository at this point in the history
Fix #5850
  • Loading branch information
vkarpov15 committed Dec 6, 2017
1 parent d90100e commit 23c8dd0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/drivers/browser/decimal128.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*!
* ignore
*/

module.exports = require('bson').Decimal128;
1 change: 1 addition & 0 deletions lib/drivers/browser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
*/

exports.Binary = require('./binary');
exports.Decimal128 = require('./decimal128');
exports.ObjectId = require('./objectid');
exports.ReadPreference = require('./ReadPreference');
5 changes: 5 additions & 0 deletions lib/drivers/node-mongodb-native/decimal128.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*!
* ignore
*/

module.exports = require('mongodb').Decimal128;
1 change: 1 addition & 0 deletions lib/drivers/node-mongodb-native/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
*/

exports.Binary = require('./binary');
exports.Decimal128 = require('./decimal128');
exports.ObjectId = require('./objectid');
exports.ReadPreference = require('./ReadPreference');
2 changes: 1 addition & 1 deletion lib/types/decimal128.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
* @constructor ObjectId
*/

module.exports = require('bson').Decimal128;
module.exports = require('../drivers').Decimal128;

0 comments on commit 23c8dd0

Please sign in to comment.