Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/ioIndexedDB.js

Issue 29808584: Noissue - Use destructuring (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created June 15, 2018, 8:09 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld