From f3774641605efcb2cd3ad1e615dc4d816a530f57 Mon Sep 17 00:00:00 2001 From: Olivier Combe Date: Mon, 8 Dec 2014 18:19:30 +0100 Subject: [PATCH] fix: Blob fix for IE9 --- src/angular-localForage.js | 2 +- tests/angular-localForage.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/angular-localForage.js b/src/angular-localForage.js index 800d922..1fb0e7e 100644 --- a/src/angular-localForage.js +++ b/src/angular-localForage.js @@ -113,7 +113,7 @@ } else { var deferred = $q.defer(), args = arguments, - localCopy = angular.isDefined(Blob) && value instanceof Blob ? value : angular.copy(value); + localCopy = typeof Blob !== 'undefined' && value instanceof Blob ? value : angular.copy(value); //avoid $promises attributes from value objects, if present. if(angular.isObject(localCopy) && angular.isDefined(localCopy.$promise)) { diff --git a/tests/angular-localForage.js b/tests/angular-localForage.js index cb511dd..94d5058 100644 --- a/tests/angular-localForage.js +++ b/tests/angular-localForage.js @@ -289,7 +289,7 @@ describe('Module: LocalForageModule', function() { }); it('setItem should be able to store a Blob', function(done) { - if(typeof Bldob !== 'undefined') { + if(typeof Blob !== 'undefined') { var interval = triggerDigests(); var aFileParts = ["hey!<\/b><\/a>"];