mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-29 00:20:04 +01:00
core: remove unnecessary exist check slowing reads
This commit is contained in:
committed by
Abdullah Atta
parent
beaace9b54
commit
bd238a6fe4
@@ -56,7 +56,6 @@ export default class Indexer extends Storage {
|
||||
}
|
||||
|
||||
read(key, isArray = false) {
|
||||
if (!this.exists(key)) return;
|
||||
return super.read(this.makeId(key), isArray);
|
||||
}
|
||||
|
||||
@@ -69,9 +68,7 @@ export default class Indexer extends Storage {
|
||||
}
|
||||
|
||||
async readMulti(keys) {
|
||||
const entries = await super.readMulti(
|
||||
keys.filter(this.exists, this).map(this.makeId, this)
|
||||
);
|
||||
const entries = await super.readMulti(keys.map(this.makeId, this));
|
||||
entries.forEach((entry) => {
|
||||
entry[0] = entry[0].replace(`_${this.type}`, "");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user