mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
server-ts: Change data type
This commit is contained in:
parent
de7f4de05b
commit
5d683721b1
@ -39,9 +39,9 @@ function load() {
|
|||||||
new BNote().update(row).init();
|
new BNote().update(row).init();
|
||||||
}
|
}
|
||||||
|
|
||||||
const branchRows = sql.getRawRows<{ notePosition: number}>(`SELECT branchId, noteId, parentNoteId, prefix, notePosition, isExpanded, utcDateModified FROM branches WHERE isDeleted = 0`);
|
const branchRows = sql.getRawRows<BranchRow>(`SELECT branchId, noteId, parentNoteId, prefix, notePosition, isExpanded, utcDateModified FROM branches WHERE isDeleted = 0`);
|
||||||
// in-memory sort is faster than in the DB
|
// in-memory sort is faster than in the DB
|
||||||
branchRows.sort((a, b) => a.notePosition - b.notePosition);
|
branchRows.sort((a, b) => (a.notePosition || 0) - (b.notePosition || 0));
|
||||||
|
|
||||||
for (const row of branchRows) {
|
for (const row of branchRows) {
|
||||||
new BBranch().update(row).init();
|
new BBranch().update(row).init();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user