fix lint issues

Signed-off-by: Anna No <anna.no@xored.com>
This commit is contained in:
Anna No 2022-04-20 00:12:23 +07:00
parent d1a3139b94
commit e5b3f434d4
No known key found for this signature in database
GPG Key ID: 08C11FFC23177C87

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Card, CardLabel } from '@anticrm/board'
import type { Ref, WithLookup } from '@anticrm/core'
import type { Ref } from '@anticrm/core'
import { getClient } from '@anticrm/presentation'
import {
Button,
@ -18,7 +18,7 @@
import board from '../../plugin'
import { getBoardLabels } from '../../utils/BoardUtils'
export let object: WithLookup<Card>
export let object: Card
export let search: string | undefined = undefined
export let onEdit: (label: CardLabel) => void
export let onCreate: () => void
@ -60,14 +60,13 @@
return
}
const data = { labels: label._id }
if (object?.labels?.includes(label._id)) {
await client.update(object, {
$pull: data
$pull: { labels: label._id as any } // TODO: fix as any
})
} else {
await client.update(object, {
$push: data
$push: { labels: label._id }
})
}