Skip to content

Commit

Permalink
fix toJSON [@jderuere]
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Nov 18, 2015
1 parent 1bf5347 commit 7e25621
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ function hasBinary(data) {
}
}
} else if (obj && 'object' == typeof obj) {
if (obj.toJSON) {
// see: https://github.com/Automattic/has-binary/pull/4
if (obj.toJSON && 'function' == typeof obj.toJSON) {
obj = obj.toJSON();
}

Expand Down

0 comments on commit 7e25621

Please sign in to comment.