8000 Merge pull request #25 from hamstercat/master · webcss/angular-indexedDB@38ef791 · GitHub
[go: up one dir, main page]

Skip to content

Commit 38ef791

Browse files
committed
Merge pull request #25 from hamstercat/master
Fixed insert and upsert never resolving
2 parents 3502708 + f43efd0 commit 38ef791

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/indexeddb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ angular.module('xc.indexedDB', []).provider('$indexedDB', function() {
211211
});
212212
};
213213
req.onsuccess = function(e) {
214-
if(i == data.length) {
214+
if(i == data.length - 1) {
215215
$rootScope.$apply(function(){
216216
d.resolve(e.target.result);
217217
});
@@ -260,7 +260,7 @@ angular.module('xc.indexedDB', []).provider('$indexedDB', function() {
260260
});
261261
};
262262
req.onsuccess = function(e) {
263-
if(i == data.length) {
263+
if(i == data.length - 1) {
264264
$rootScope.$apply(function(){
265265
d.resolve(e.target.result);
266266
});

0 commit comments

Comments
 (0)
0