mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-13 13:17:45 +02:00
Fix activity query (#3234)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -64,15 +64,19 @@
|
||||
})
|
||||
|
||||
const query = createQuery()
|
||||
$: if (_id && _class) {
|
||||
query.query(_class, { _id }, (result) => {
|
||||
object = result[0]
|
||||
if (object != null) {
|
||||
realObjectClass = object._class
|
||||
}
|
||||
})
|
||||
} else {
|
||||
query.unsubscribe()
|
||||
$: updateQuery(_id, _class)
|
||||
|
||||
function updateQuery (_id: Ref<Doc>, _class: Ref<Class<Doc>>) {
|
||||
if (_id && _class) {
|
||||
query.query(_class, { _id }, (result) => {
|
||||
object = result[0]
|
||||
if (object != null) {
|
||||
realObjectClass = object._class
|
||||
}
|
||||
})
|
||||
} else {
|
||||
query.unsubscribe()
|
||||
}
|
||||
}
|
||||
|
||||
let oldClass: Ref<Class<Doc>>
|
||||
|
||||
Reference in New Issue
Block a user