-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(GridFS): fix TypeError: doc.data.length is not a function
When using the promoteBuffers connect option, `doc.data` is already a node.js Buffer. So trying to call `length()` like for `BSON.Binary` fails. Fixed simply by checking `Buffer.isBuffer(doc.data)` type.
- Loading branch information
1 parent
f4e85c6
commit 811de0c
Showing
1 changed file
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters