mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
sonic: fix imvalid limit error
This commit is contained in:
1 parent
6924875ec9
commit
23880f11fa
2 files changed
+2
-2
No files matched your search
@@ -22,6 +22,6 @@ bus.on('problem/del', async (domainId, docId) => {
|
||||
global.Hydro.lib.problemSearch = async (domainId: string, query: string) => {
|
||||
const c = system.get('pagination.problem');
|
||||
const docIds = await sonic.query('problem', `${domainId}@title`, query, { limit: c });
|
||||
docIds.push(...await sonic.query('problem', `${domainId}@content`, query, { limit: c - docIds.length }));
|
||||
if (c - docIds.length > 0) docIds.push(...await sonic.query('problem', `${domainId}@content`, query, { limit: c - docIds.length }));
|
||||
return docIds.map(Number);
|
||||
};
|
||||
Reference in new issue
Block a user