mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-04-29 08:49:16 -05:00
implemented consistency checks
This commit is contained in:
+7
-1
@@ -155,10 +155,16 @@ async function getMap(query, params = []) {
|
||||
return map;
|
||||
}
|
||||
|
||||
async function getFlattenedResults(key, query, params = []) {
|
||||
async function getFlattenedResults(query, params = []) {
|
||||
const list = [];
|
||||
const result = await getResults(query, params);
|
||||
|
||||
if (result.length === 0) {
|
||||
return list;
|
||||
}
|
||||
|
||||
const key = Object.keys(result[0])[0];
|
||||
|
||||
for (const row of result) {
|
||||
list.push(row[key]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user