From b96811df25913926cb686b6b0400bc92d58107fa Mon Sep 17 00:00:00 2001 From: Hengjie Date: Fri, 6 Dec 2013 02:10:41 +1300 Subject: [PATCH] Fix Blob creation in Safari 7.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It should be !== ‘undefined’ to avoid matching everything that Blob can be a type of --- src/shared/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/util.js b/src/shared/util.js index fde8a6fa5..744b9ad21 100644 --- a/src/shared/util.js +++ b/src/shared/util.js @@ -1092,7 +1092,7 @@ var StatTimer = (function StatTimerClosure() { })(); PDFJS.createBlob = function createBlob(data, contentType) { - if (typeof Blob === 'function') + if (typeof Blob !== 'undefined') return new Blob([data], { type: contentType }); // Blob builder is deprecated in FF14 and removed in FF18. var bb = new MozBlobBuilder();