Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: accept objects in file.add
Browse files Browse the repository at this point in the history
  • Loading branch information
dryajov committed Mar 9, 2018
1 parent 5b40b41 commit c60d35f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/components/files.js
Expand Up @@ -193,7 +193,8 @@ module.exports = function files (self) {
const ok = Buffer.isBuffer(data) ||
isStream.readable(data) ||
Array.isArray(data) ||
OtherBuffer.isBuffer(data)
OtherBuffer.isBuffer(data) ||
typeof data === 'object'

if (!ok) {
return callback(new Error('Invalid arguments, data must be an object, Buffer or readable stream'))
Expand Down

0 comments on commit c60d35f

Please sign in to comment.