webcss / angular-indexedDB

An angularjs serviceprovider to utilize indexedDB with angular
149 stars 99 forks source link

Fix problem with Firefox #35

Closed alansouzati closed 10 years ago

alansouzati commented 10 years ago

Hi,

In Firefox 31 (latest version), I can't use the library because it already has the indexedDB var in the window scope. As we are using strict mode, we receive the following error:

TypeError: setting a property that has only a getter

This pull request is to fix this exact problem by replacing line 9 by this:

if(!('indexedDB' in window)) { var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; }

alansouzati commented 10 years ago

I have another solution. Closing this pull request..