mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-10 19:57:43 +02:00
QFix: add limit to count queries (#7458)
Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
@@ -106,9 +106,14 @@
|
||||
|
||||
const starredQuery = createQuery()
|
||||
let isStarred = false
|
||||
$: starredQuery.query(document.class.SavedDocument, { attachedTo: _id }, (res) => {
|
||||
isStarred = res.length !== 0
|
||||
})
|
||||
$: starredQuery.query(
|
||||
document.class.SavedDocument,
|
||||
{ attachedTo: _id },
|
||||
(res) => {
|
||||
isStarred = res.length !== 0
|
||||
},
|
||||
{ limit: 1 }
|
||||
)
|
||||
|
||||
async function createEmbedding (file: File): Promise<{ file: Ref<Blob>, type: string } | undefined> {
|
||||
if (doc === undefined) {
|
||||
|
||||
Reference in New Issue
Block a user