mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-26 01:34:07 +00:00
[lint] Enforce @typescript-eslint/no-floating-promises (#3402)
This commit is contained in:
@@ -32,23 +32,23 @@ export const useServerLogs = (options: UseServerLogsOptions = {}) => {
|
||||
}
|
||||
}
|
||||
|
||||
const start = () => {
|
||||
api.subscribeLogs(true)
|
||||
const start = async () => {
|
||||
await api.subscribeLogs(true)
|
||||
stop = useEventListener(api, LOGS_MESSAGE_TYPE, handleLogMessage)
|
||||
}
|
||||
|
||||
const stopListening = () => {
|
||||
const stopListening = async () => {
|
||||
stop?.()
|
||||
stop = null
|
||||
api.subscribeLogs(false)
|
||||
await api.subscribeLogs(false)
|
||||
}
|
||||
|
||||
if (immediate) {
|
||||
start()
|
||||
void start()
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
stopListening()
|
||||
onUnmounted(async () => {
|
||||
await stopListening()
|
||||
logs.value = []
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user