Index: lib/ioIndexedDB.js |
=================================================================== |
--- a/lib/ioIndexedDB.js |
+++ b/lib/ioIndexedDB.js |
@@ -104,17 +104,17 @@ |
resolve(filesData); |
}; |
cursorReq.onsuccess = event => |
{ |
let cursor = event.currentTarget.result; |
if (cursor) |
{ |
- let value = cursor.value; |
+ let {value} = cursor; |
Sebastian Noack
2018/06/15 20:13:57
Shouldn't this one at least trigger an eslint erro
hub
2018/06/15 20:20:03
both were triggered. that's why I'm fixing them.
Sebastian Noack
2018/06/15 21:18:33
Weird, not for me:
$ hg id
d97edcab2c18 tip next
|
filesData.push({ |
fileName: cursor.key, |
content: value.content, |
lastModified: value.lastModified |
}); |
cursor.continue(); |
} |
@@ -161,17 +161,17 @@ |
{ |
return new Promise((resolve, reject) => |
{ |
let store = getObjectStore(dbInstance, storeName); |
let req = store.get(fileToKey(fileName)); |
req.onsuccess = event => |
{ |
- let result = event.currentTarget.result; |
+ let {result} = event.currentTarget; |
if (result) |
resolve(result); |
else |
reject({type: "NoSuchFile"}); |
}; |
req.onerror = reject; |
}); |