Skip to content

Commit

Permalink
[fix] Ensure globals are functions before running instanceof (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne authored Apr 24, 2017
1 parent 8e5465d commit 2f31a4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions binary.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ exports.removeBlobs = function(data, callback) {
if (!obj) return obj;

// convert any blob
if ((global.Blob && obj instanceof Blob) ||
(global.File && obj instanceof File)) {
if ((typeof global.Blob === 'function' && obj instanceof Blob) ||
(typeof global.File === 'function' && obj instanceof File)) {
pendingBlobs++;

// async filereader
Expand Down

0 comments on commit 2f31a4e

Please sign in to comment.