mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 22:05:44 +01:00
server-ts: Fix errors in becca-interface
This commit is contained in:
@@ -110,7 +110,7 @@ function getValue<T>(query: string, params: Params = []): T {
|
||||
// smaller values can result in better performance due to better usage of statement cache
|
||||
const PARAM_LIMIT = 100;
|
||||
|
||||
function getManyRows<T>(query: string, params: Params): T[] | null {
|
||||
function getManyRows<T>(query: string, params: Params): T[] {
|
||||
let results: unknown[] = [];
|
||||
|
||||
while (params.length > 0) {
|
||||
@@ -136,7 +136,7 @@ function getManyRows<T>(query: string, params: Params): T[] | null {
|
||||
results = results.concat(subResults);
|
||||
}
|
||||
|
||||
return results as (T[] | null);
|
||||
return (results as (T[] | null) || []);
|
||||
}
|
||||
|
||||
function getRows<T>(query: string, params: Params = []): T[] {
|
||||
|
||||
Reference in New Issue
Block a user